gt:                 if (mAudioNarrator != null)
context: package org.storymaker.app;
  
  import timber.log.Timber;
  
  import org.storymaker.app.media.AudioRecorderView;
  import org.storymaker.app.media.MediaProjectManager;
  import org.storymaker.app.model.Media;
  import org.storymaker.app.model.Project;
  
  import java.io.File;
  import java.util.ArrayList;
  
  import android.content.SharedPreferences;
  import android.graphics.Bitmap;
  import android.graphics.BitmapFactory;
  import android.os.Bundle;
  import android.os.Handler;
  import android.os.Message;
  import android.preference.PreferenceManager;
  import android.support.v4.app.Fragment;
  import android.support.v4.view.ViewPager;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.ImageView;
  import android.widget.SeekBar;
  
  /**
   * 
   */
  public class ReviewFragment extends Fragment {
      private final static String TAG = "OrderClipsFragment";
      public ViewPager mAddClipsViewPager;
      View mView = null;
      private EditorBaseActivity mActivity;
      Button mPlayButton;//, mButtonAddNarration, mButtonPlayNarration;
      private ImageView mImageViewMedia;
      private PreviewVideoView mPreviewVideoView = null;
  //    private LinearLayout mLLControlBar = null;
      private SeekBar mSeekBar = null;
  //    RangeSeekBar<Integer> mRangeSeekBar = null;
  //    ViewGroup mRangeSeekBarContainer = null;
      public MediaProjectManager mMPM;
      int mCurrentClipIdx = 0;
      AudioRecorderView mAudioNarrator = null;
      private boolean mKeepRunningPreview = false;
      boolean mTrimMode = false;
      ArrayList<Media> mMediaList;
      
      private File mFileAudioNarration = null;
      
      int mPhotoEssaySlideLength = -1;//5 seconds
  
      public ReviewFragment()
      {
      }
      
      public static final String ARG_SECTION_NUMBER = "section_number";
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          mActivity = (EditorBaseActivity) getActivity();
          mMPM = mActivity.mMPM;
          mMediaList = mMPM.mProject.getMediaAsList();
          View view = inflater.inflate(R.layout.fragment_story_review, null);
          
           SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(view.getContext().getApplicationContext());
           mPhotoEssaySlideLength = Integer.parseInt(settings.getString("pslideduration", AppConstants.DEFAULT_SLIDE_DURATION+""));
          
          mImageViewMedia = (ImageView) view.findViewById(R.id.imageView1);
          mPreviewVideoView = (PreviewVideoView) view.findViewById(R.id.previewVideoView);
          mSeekBar = (SeekBar) view.findViewById(R.id.seekBar1);
          mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener(){
              @Override
              public void onProgressChanged(SeekBar seekBar, int progress,
                      boolean fromUser) {
                  if (fromUser)
                      mPreviewVideoView.seekTo(progress);
              }
  
              @Override
              public void onStartTrackingTouch(SeekBar seekBar) {
              }
  
              @Override
              public void onStopTrackingTouch(SeekBar seekBar) {
              }
              
          });
          
          if (mMPM.mProject.getStoryType() == Project.STORY_TYPE_ESSAY)
          {
              
              if (mAudioNarrator == null)
              {
                  // FIXME make this work for project review tab
                  String audioFile = "narration" + mMPM.mScene.getId() + ".wav";
                  mFileAudioNarration = new File(mMPM.getExternalProjectFolder(mMPM.mProject,mActivity.getBaseContext()),audioFile);
                  mAudioNarrator = new AudioRecorderView(mFileAudioNarration,getActivity());
              }
          }
          
          if (mMPM.mProject.getStoryType() == Project.STORY_TYPE_ESSAY
                  || mMPM.mProject.getStoryType() == Project.STORY_TYPE_VIDEO)
          {
          	
  	        mPlayButton = (Button) view.findViewById(R.id.buttonPlay);
  	        mPlayButton.setOnClickListener(new OnClickListener() {
  	
  	            @Override
  	            public void onClick(View v) {
  	                
  	                playNarration(true);
  	                
  	            }
  	        });
          }
          
          mPreviewVideoView.setCompletionCallback(new Runnable() {
              @Override
              public void run() {
                  mImageViewMedia.setVisibility(View.VISIBLE);
                  mPreviewVideoView.setVisibility(View.GONE);
                  mKeepRunningPreview = false;
                  mPlayButton.setText(R.string.play_recording);
                  showThumbnail(mCurrentClipIdx);
              }
          });
          
          mImageViewMedia.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  previewClip(mCurrentClipIdx);
              }
          });
  
          showThumbnail(mCurrentClipIdx);
          
          return view;
      }
      
      private void stopRecordNarration ()
      {
          //stop the audio recorder
          mAudioNarrator.stopRecording();
  //        mButtonAddNarration.setText("Re-record narration?");
          
          //start the playback
          if (mMPM.mProject.getStoryType() == Project.STORY_TYPE_ESSAY)
              handlePhotoPlayToggle ();
          else if (mMPM.mProject.getStoryType() == Project.STORY_TYPE_VIDEO)
              handleVideoAudioPlayToggle();
  
      }
      
      private void playNarration (boolean start)
      {
          
          if (mAudioNarrator != null) { 
              if (start) {
                  mAudioNarrator.startPlaying();
              } else {
                  mAudioNarrator.stopPlaying();
              }
          }
          
          //start the playback
          if (mMPM.mProject.getStoryType() == Project.STORY_TYPE_ESSAY)
              handlePhotoPlayToggle ();
          else
              handleVideoAudioPlayToggle();
      }
      
      
      private void handlePhotoPlayToggle ()
      {
          if (mKeepRunningPreview)
          {
              mPlayButton.setText(R.string.play_recording);
              mSeekBar.setProgress(0);
              mKeepRunningPreview = false;
          }
          else
          {
              mSeekBar.setMax(mMediaList.size()*mPhotoEssaySlideLength);
              mSeekBar.setProgress(0);
          
              mPlayButton.setText(R.string.stop_recording);
              mKeepRunningPreview = true;
              
              Thread thread = new Thread ()
              {
              
                  public void run ()
                  {
                      
                      String[] pathArray = mMPM.mProject.getMediaAsPathArray();
                      
                      for (int i = 0; i < pathArray.length && mKeepRunningPreview; i++)
                      {
                          Message msg = new Message();
                          msg.what = 1;
                          msg.getData().putString("path", pathArray[i]);
                          msg.getData().putInt("idx", i);
                          hImageUpdater.sendMessage(msg);
                          
                          try {Thread.sleep(mPhotoEssaySlideLength * 1000);}catch(Exception e){}
                      }
                      
                      mKeepRunningPreview = false;
                      hImageUpdater.sendEmptyMessage(-1);
                      
                  }
                  
              };
              
              thread.start();
              
              
               
          }
  
      }
      
      
      Handler hImageUpdater = new Handler ()
      {
  
          @Override
          public void handleMessage(Message msg) {                
              super.handleMessage(msg);
              
              switch (msg.what)
              {
                  case -1: //stop playback
                  mPlayButton.setText(R.string.play_recording);
  