summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-05-26 23:13:58 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-05-26 23:13:58 -0700
commit0542ce1f6f50af1ef45d8623ff3cdc2cc3a92f6b (patch)
treee805203936f2370cf3174626fa25a672be59c550
parent56eedf60fc6dfd30ae096d3f003743ada3fe6d53 (diff)
parente30f4c4304ca8bc1207a955481dcee4f3cc3da07 (diff)
downloadandroid_packages_apps_Snap-0542ce1f6f50af1ef45d8623ff3cdc2cc3a92f6b.tar.gz
android_packages_apps_Snap-0542ce1f6f50af1ef45d8623ff3cdc2cc3a92f6b.tar.bz2
android_packages_apps_Snap-0542ce1f6f50af1ef45d8623ff3cdc2cc3a92f6b.zip
Merge "Camera2: Change picture format to Jpeg when start from other APK"
-rw-r--r--src/com/android/camera/PhotoModule.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 813a02a0d..bcb2ef7a8 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2345,6 +2345,16 @@ public class PhotoModule
String pictureFormat = mPreferences.getString(
CameraSettings.KEY_PICTURE_FORMAT,
mActivity.getString(R.string.pref_camera_picture_format_default));
+
+ //Change picture format to JPEG if camera is start from other APK by intent.
+ if (mIsImageCaptureIntent && !pictureFormat.equals(PIXEL_FORMAT_JPEG)) {
+ pictureFormat = PIXEL_FORMAT_JPEG;
+ Editor editor = mPreferences.edit();
+ editor.putString(CameraSettings.KEY_PICTURE_FORMAT,
+ mActivity.getString(R.string.pref_camera_picture_format_value_jpeg));
+ editor.apply();
+ }
+ Log.v(TAG, "Picture format value =" + pictureFormat);
mParameters.set(KEY_PICTURE_FORMAT, pictureFormat);
// Set JPEG quality.