summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-07-17 11:53:42 +0800
committerMichael Bestas <mkbestas@lineageos.org>2019-11-09 22:47:37 +0200
commit0aa3f9f58495c1c0c630bf896ab3aed0465f71de (patch)
treeaaf6e5564c9a12c47cbdd8c03b1af1c0c57d6efb
parenta90584b19fae9b8ec75abf8659641877d403a576 (diff)
downloadandroid_packages_apps_Snap-0aa3f9f58495c1c0c630bf896ab3aed0465f71de.zip
android_packages_apps_Snap-0aa3f9f58495c1c0c630bf896ab3aed0465f71de.tar.gz
android_packages_apps_Snap-0aa3f9f58495c1c0c630bf896ab3aed0465f71de.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
-rwxr-xr-xsrc/com/android/camera/PhotoModule.java28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 6040a0e..06c7cf6 100755
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -3312,26 +3312,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(JpegEncodingQualityMappings.getQualityNumber(jpegQuality));
- int jpegFileSize = estimateJpegFileSize(pic_size, jpegQuality);
- if (jpegFileSize != mJpegFileSizeEstimation) {
- mJpegFileSizeEstimation = jpegFileSize;
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- updateRemainingPhotos();
- }
- });
- }
+ } else {
+ mParameters.setJpegQuality(JpegEncodingQualityMappings.getQualityNumber(jpegQuality));
+ int jpegFileSize = estimateJpegFileSize(pic_size, jpegQuality);
+ if (jpegFileSize != mJpegFileSizeEstimation) {
+ mJpegFileSizeEstimation = jpegFileSize;
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ updateRemainingPhotos();
+ }
+ });
}
}