diff options
author | codeworkx <codeworkx@cyanogenmod.org> | 2006-01-16 00:10:40 +0100 |
---|---|---|
committer | Arne Coucheron <arco68@gmail.com> | 2018-01-26 01:01:03 +0100 |
commit | 41c350944bd0dc79024fad681f3d8e0cf6af3bf0 (patch) | |
tree | 572afbbc6a002d0e5a85f6e1f68517d81de4fbcc /src | |
parent | d81de0d9b5a3b34a5356dd9b980adbfecc7e8f29 (diff) | |
download | android_packages_apps_Snap-41c350944bd0dc79024fad681f3d8e0cf6af3bf0.tar.gz android_packages_apps_Snap-41c350944bd0dc79024fad681f3d8e0cf6af3bf0.tar.bz2 android_packages_apps_Snap-41c350944bd0dc79024fad681f3d8e0cf6af3bf0.zip |
add options to restart preview onPictureTaken
Change-Id: I7ce9d6f2323e367743e6d4c9662b846d3052f2a4
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); } |