summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-07-17 11:53:42 +0800
committerdianlujitao <dianlujitao@lineageos.org>2018-12-19 14:00:02 +0800
commited169d0c17f4fd3b6a51ae3919c2b6103a226393 (patch)
tree6d417186a8dfe2617b6b90685fa5ce6b288abcb6
parent3a4f42691307a811a5259a2b50cf11f34751c8f7 (diff)
downloadandroid_packages_apps_Snap-ed169d0c17f4fd3b6a51ae3919c2b6103a226393.zip
android_packages_apps_Snap-ed169d0c17f4fd3b6a51ae3919c2b6103a226393.tar.gz
android_packages_apps_Snap-ed169d0c17f4fd3b6a51ae3919c2b6103a226393.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.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 100644
--- 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();
+ }
+ });
}
}