diff options
author | Angus Kong <shkong@google.com> | 2013-10-09 02:58:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-09 02:58:53 +0000 |
commit | b04dcdb5cea6ac42f8ba0d699dc45e965d104a5e (patch) | |
tree | 71026a08924dd74d77cfe257960c8972b930be10 /src/com | |
parent | 3179f6a49516833761be5155c4e1244ac0aa17fe (diff) | |
parent | 0fb819b4619cd4ac20f9d381739e444da011d4ed (diff) | |
download | android_packages_apps_Snap-b04dcdb5cea6ac42f8ba0d699dc45e965d104a5e.tar.gz android_packages_apps_Snap-b04dcdb5cea6ac42f8ba0d699dc45e965d104a5e.tar.bz2 android_packages_apps_Snap-b04dcdb5cea6ac42f8ba0d699dc45e965d104a5e.zip |
Merge "Don't go into Gcam when it's capture intent." into gb-ub-photos-carlsbad
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 6 | ||||
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 1 | ||||
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 18c8a9ab8..3e5a7c044 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -103,8 +103,6 @@ public class CameraActivity extends Activity "com.android.camera.action.TRIM"; public static final String MEDIA_ITEM_PATH = "media-item-path"; - private static final String PREF_STARTUP_MODULE_INDEX = "camera.startup_module"; - // The intent extra for camera from secure lock screen. True if the gallery // should only show newly captured pictures. sSecureAlbumId does not // increment. This is used when switching between camera, camcorder, and @@ -966,7 +964,7 @@ public class CameraActivity extends Activity // If the activity has not been started using an explicit intent, // read the module index from the last time the user changed modes SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - moduleIndex = prefs.getInt(PREF_STARTUP_MODULE_INDEX, -1); + moduleIndex = prefs.getInt(CameraSettings.KEY_STARTUP_MODULE_INDEX, -1); if ((moduleIndex == ModuleSwitcher.GCAM_MODULE_INDEX && !GcamHelper.hasGcamCapture()) || moduleIndex < 0) { moduleIndex = ModuleSwitcher.PHOTO_MODULE_INDEX; @@ -1258,7 +1256,7 @@ public class CameraActivity extends Activity // Store the module index so we can use it the next time the Camera // starts up. SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - prefs.edit().putInt(PREF_STARTUP_MODULE_INDEX, moduleIndex).apply(); + prefs.edit().putInt(CameraSettings.KEY_STARTUP_MODULE_INDEX, moduleIndex).apply(); } /** diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index 9c90c5b33..bd016f0a3 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -65,6 +65,7 @@ public class CameraSettings { public static final String KEY_CAMERA_FIRST_USE_HINT_SHOWN = "pref_camera_first_use_hint_shown_key"; public static final String KEY_VIDEO_FIRST_USE_HINT_SHOWN = "pref_video_first_use_hint_shown_key"; public static final String KEY_PHOTOSPHERE_PICTURESIZE = "pref_photosphere_picturesize_key"; + public static final String KEY_STARTUP_MODULE_INDEX = "camera.startup_module"; public static final String EXPOSURE_DEFAULT_VALUE = "0"; diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 88fb72a43..3c495dbfe 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -487,6 +487,10 @@ public class PhotoModule loadCameraPreferences(); mUI.onCameraOpened(mPreferenceGroup, mPreferences, mParameters, this); + if (mIsImageCaptureIntent) { + mUI.overrideSettings(CameraSettings.KEY_CAMERA_HDR_PLUS, + mActivity.getString(R.string.setting_off_value)); + } updateSceneMode(); showTapToFocusToastIfNeeded(); @@ -1716,7 +1720,7 @@ public class PhotoModule mCameraDevice.setParameters(mParameters); // Switch to gcam module if HDR+ was selected - if (doModeSwitch) { + if (doModeSwitch && !mIsImageCaptureIntent) { mActivity.onModuleSelected(ModuleSwitcher.GCAM_MODULE_INDEX); } } |