summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-07-17 11:53:42 +0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-07-18 20:30:41 -0700
commitbd63e9d4bfb00fb224d64ca392f2e80524b9ce09 (patch)
treed3a44ccafef58aa3988e9d60b0077fb01f49d09e
parentee21895d7d0f8f75087a7fa50be7fdb268be059b (diff)
downloadandroid_packages_apps_Snap-bd63e9d4bfb00fb224d64ca392f2e80524b9ce09.zip
android_packages_apps_Snap-bd63e9d4bfb00fb224d64ca392f2e80524b9ce09.tar.gz
android_packages_apps_Snap-bd63e9d4bfb00fb224d64ca392f2e80524b9ce09.tar.bz2
Snap: Always allow 100% JPEG quality to be set
Previously, we were checking if the selected JPEG quality was 100% and not setting the JPEG quality if some conditions were met. There isn't any history nor explanation on why we weren't setting the JPEG quality to 100%, so just remove the redundant check. Change-Id: Ie0ab555ad35942bd115751fd10e4f4c11fa7a76d
-rw-r--r--src/com/android/camera/PhotoModule.java25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index c2d00b5..3deea9c 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2956,25 +2956,20 @@ public class PhotoModule
String jpegQuality = mPreferences.getString(
CameraSettings.KEY_JPEG_QUALITY,
mActivity.getString(R.string.pref_camera_jpegquality_default));
- //mUnsupportedJpegQuality = false;
Size pic_size = mParameters.getPictureSize();
if (pic_size == null) {
Log.e(TAG, "error getPictureSize: size is null");
} else {
- if ("100".equals(jpegQuality) && (pic_size.width >= 3200)) {
- //mUnsupportedJpegQuality = true;
- } else {
- mParameters.setJpegQuality(Integer.parseInt(jpegQuality));
- int jpegFileSize = estimateJpegFileSize(pic_size, jpegQuality);
- if (jpegFileSize != mJpegFileSizeEstimation) {
- mJpegFileSizeEstimation = jpegFileSize;
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- updateRemainingPhotos();
- }
- });
- }
+ mParameters.setJpegQuality(Integer.parseInt(jpegQuality));
+ int jpegFileSize = estimateJpegFileSize(pic_size, jpegQuality);
+ if (jpegFileSize != mJpegFileSizeEstimation) {
+ mJpegFileSizeEstimation = jpegFileSize;
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ updateRemainingPhotos();
+ }
+ });
}
}