summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CameraSettings.java
diff options
context:
space:
mode:
authorLars Greiss <kufikugel@googlemail.com>2013-12-29 12:23:33 +0100
committerMichael Bestas <mikeioannina@gmail.com>2015-09-17 23:26:03 +0300
commite453b7728763c1e20718060e0b5cf78fd342595f (patch)
treefaf6d6ba5c5fe11b8f0cf68d52854b284085d0c8 /src/com/android/camera/CameraSettings.java
parent7d9c22ca00a78614afbd79e3785bab7e39ce02c4 (diff)
downloadandroid_packages_apps_Snap-e453b7728763c1e20718060e0b5cf78fd342595f.tar.gz
android_packages_apps_Snap-e453b7728763c1e20718060e0b5cf78fd342595f.tar.bz2
android_packages_apps_Snap-e453b7728763c1e20718060e0b5cf78fd342595f.zip
Camera: remove fine/normal/superfine jpegquality and use always int
We use now a set of int values the user can exactly assign. Showing as well the normal fine superfine as choice is just a duplicate. As well we can get rid of the weird converts of the mixed values. To take care that the user does not get into problems we updated the db version and we make a convertion. Change-Id: I2615666bc1c929c0c045840fad1ece55fb0640af
Diffstat (limited to 'src/com/android/camera/CameraSettings.java')
-rw-r--r--src/com/android/camera/CameraSettings.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 7db9fec80..3eab068c3 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -242,7 +242,7 @@ public class CameraSettings {
public static final String VALUE_ON = "on";
public static final String VALUE_OFF = "off";
- public static final int CURRENT_VERSION = 5;
+ public static final int CURRENT_VERSION = 6;
public static final int CURRENT_LOCAL_VERSION = 2;
private static final String TAG = "CameraSettings";
@@ -1049,6 +1049,23 @@ public class CameraSettings {
// Just use video quality to replace it and
// ignore the current settings.
editor.remove("pref_camera_videoquality_key");
+ version = 4;
+ }
+ if (version == 4) {
+ // Just upgrade to version 5 directly
+ version = 5;
+ }
+ if (version == 5) {
+ // Change jpeg quality {normal,fine,superfine} back to {65,75,85}
+ String quality = pref.getString(KEY_JPEG_QUALITY, "superfine");
+ if (quality.equals("normal")) {
+ quality = "65";
+ } else if (quality.equals("fine")) {
+ quality = "75";
+ } else {
+ quality = context.getString(R.string.pref_camera_jpegquality_default);
+ }
+ editor.putString(KEY_JPEG_QUALITY, quality);
}
editor.putInt(KEY_VERSION, CURRENT_VERSION);