summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CameraSettings.java
diff options
context:
space:
mode:
authorWu-cheng Li <>2009-04-13 07:02:51 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-13 07:02:51 -0700
commite0770004600f76cc4b440104e98e14712b4fd1c6 (patch)
tree69fd3dac6afd6a639a8341761418c5f83a9a7722 /src/com/android/camera/CameraSettings.java
parent73b7a3a18a2e4ab0302c60a486f244acebe64883 (diff)
downloadpackages_apps_LegacyCamera-e0770004600f76cc4b440104e98e14712b4fd1c6.zip
packages_apps_LegacyCamera-e0770004600f76cc4b440104e98e14712b4fd1c6.tar.gz
packages_apps_LegacyCamera-e0770004600f76cc4b440104e98e14712b4fd1c6.tar.bz2
AI 145839: Add UI for JPEG quality setting.
BUG=1761244 Automated import of CL 145839
Diffstat (limited to 'src/com/android/camera/CameraSettings.java')
-rw-r--r--src/com/android/camera/CameraSettings.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 8d0075a..d790b9f 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -38,12 +38,14 @@ public class CameraSettings extends PreferenceActivity implements
"pref_camera_whitebalance_key";
public static final String KEY_EFFECT = "pref_camera_effect_key";
public static final String KEY_PICTURE_SIZE = "pref_camera_picturesize_key";
+ public static final String KEY_JPEG_QUALITY = "pref_camera_jpegquality_key";
public static final boolean DEFAULT_VIDEO_QUALITY_VALUE = true;
private ListPreference mVideoQuality;
private ListPreference mWhiteBalance;
private ListPreference mEffect;
private ListPreference mPictureSize;
+ private ListPreference mJpegQuality;
private Parameters mParameters;
@Override
@@ -62,6 +64,7 @@ public class CameraSettings extends PreferenceActivity implements
updateWhiteBalanceSummary();
updateEffectSummary();
updatePictureSizeSummary();
+ updateJpegQualitySummary();
}
private void initUI() {
@@ -69,6 +72,7 @@ public class CameraSettings extends PreferenceActivity implements
mWhiteBalance = (ListPreference) findPreference(KEY_WHITE_BALANCE);
mEffect = (ListPreference) findPreference(KEY_EFFECT);
mPictureSize = (ListPreference) findPreference(KEY_PICTURE_SIZE);
+ mJpegQuality = (ListPreference) findPreference(KEY_JPEG_QUALITY);
getPreferenceScreen().getSharedPreferences().
registerOnSharedPreferenceChangeListener(this);
@@ -153,6 +157,10 @@ public class CameraSettings extends PreferenceActivity implements
mPictureSize.setSummary(mPictureSize.getEntry());
}
+ private void updateJpegQualitySummary() {
+ mJpegQuality.setSummary(mJpegQuality.getEntry());
+ }
+
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String key) {
if (key.equals(KEY_VIDEO_QUALITY)) {
@@ -163,6 +171,8 @@ public class CameraSettings extends PreferenceActivity implements
updateEffectSummary();
} else if (key.equals(KEY_PICTURE_SIZE)) {
updatePictureSizeSummary();
+ } else if (key.equals(KEY_JPEG_QUALITY)) {
+ updateJpegQualitySummary();
}
}
}