diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 855ebc3d5..68a5b5032 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -70,6 +70,7 @@ import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.LinearLayout; import android.widget.TextView; +import com.android.camera.app.CameraApp; import com.android.camera.CameraManager.CameraAFCallback; import com.android.camera.CameraManager.CameraAFMoveCallback; import com.android.camera.CameraManager.CameraPictureCallback; @@ -273,6 +274,8 @@ public class PhotoModule private byte[] mLastJpegData; private int mLastJpegOrientation = 0; + private static Context mApplicationContext; + private boolean mIsBokehMode = false; private TextView mBokehTipText; private boolean mDepthSuccess = false; @@ -931,6 +934,8 @@ public class PhotoModule return; } + mApplicationContext = CameraApp.getContext(); + // Initialize location service. boolean recordLocation = RecordLocationPreference.get(mPreferences, CameraSettings.KEY_RECORD_LOCATION); @@ -1459,6 +1464,18 @@ public class PhotoModule && (mCameraState != LONGSHOT) && (mSnapshotMode != CameraInfoWrapper.CAMERA_SUPPORT_MODE_ZSL) && (mReceivedSnapNum == mBurstSnapNum); + + boolean backCameraRestartPreviewOnPictureTaken = + mApplicationContext.getResources().getBoolean(R.bool.back_camera_restart_preview_onPictureTaken); + boolean frontCameraRestartPreviewOnPictureTaken = + mApplicationContext.getResources().getBoolean(R.bool.front_camera_restart_preview_onPictureTaken); + + CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId]; + if ((info.facing == CameraInfo.CAMERA_FACING_BACK && backCameraRestartPreviewOnPictureTaken) + || (info.facing == CameraInfo.CAMERA_FACING_FRONT && frontCameraRestartPreviewOnPictureTaken)) { + needRestartPreview = true; + } + if (needRestartPreview) { setupPreview(); if (CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE.equals( @@ -1499,7 +1516,6 @@ public class PhotoModule .findPreference(CameraSettings.KEY_SELFIE_MIRROR); if (selfieMirrorPref != null && selfieMirrorPref.getValue() != null && selfieMirrorPref.getValue().equalsIgnoreCase("enable")) { - CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId]; jpegData = flipJpeg(jpegData, info.orientation, orientation); jpegData = addExifTags(jpegData, orientation); } |