summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-06-23 10:40:24 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-21 18:46:32 -0700
commitec4045e8a03860fbbeb73841a9aa7e2b3a25bc11 (patch)
tree541687fed88cbe80d7bd6ba53284bbcff48bc40b
parent4016f84e0b68f94a9e9da8864b0c75de91cca64d (diff)
downloadandroid_packages_apps_Snap-ec4045e8a03860fbbeb73841a9aa7e2b3a25bc11.zip
android_packages_apps_Snap-ec4045e8a03860fbbeb73841a9aa7e2b3a25bc11.tar.gz
android_packages_apps_Snap-ec4045e8a03860fbbeb73841a9aa7e2b3a25bc11.tar.bz2
SnapdragonCamera: read jpeg quality from settings before setting.
Make sure to apply up to date jpeg quality value from SettingsManager before applying to capture request. CRs-Fixed: 993611 Change-Id: Ia335ba346f433f3b05a62676e742ab5a72b8389a
-rw-r--r--src/com/android/camera/CaptureModule.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 5178d49..baace39 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -173,7 +173,6 @@ public class CaptureModule implements CameraModule, PhotoController,
private boolean mAutoExposureRegionSupported;
// The degrees of the device rotated clockwise from its natural orientation.
private int mOrientation = OrientationEventListener.ORIENTATION_UNKNOWN;
- private int mJpegQuality;
private boolean mFirstTimeInitialized;
private boolean mInitialized = false;
private boolean mIsLinked = false;
@@ -1996,7 +1995,9 @@ public class CaptureModule implements CameraModule, PhotoController,
}
private void applyJpegQuality(CaptureRequest.Builder request) {
- request.set(CaptureRequest.JPEG_QUALITY, (byte) mJpegQuality);
+ String value = mSettingsManager.getValue(SettingsManager.KEY_JPEG_QUALITY);
+ int jpegQuality = getQualityNumber(value);
+ request.set(CaptureRequest.JPEG_QUALITY, (byte) jpegQuality);
}
private void applyAFRegions(CaptureRequest.Builder request, int id) {
@@ -2217,7 +2218,6 @@ public class CaptureModule implements CameraModule, PhotoController,
mActivity.updateStorageSpaceAndHint();
continue;
case SettingsManager.KEY_JPEG_QUALITY:
- mJpegQuality = getQualityNumber(value);
estimateJpegFileSize();
continue;
case SettingsManager.KEY_CAMERA2: