From e0770004600f76cc4b440104e98e14712b4fd1c6 Mon Sep 17 00:00:00 2001 From: Wu-cheng Li <> Date: Mon, 13 Apr 2009 07:02:51 -0700 Subject: AI 145839: Add UI for JPEG quality setting. BUG=1761244 Automated import of CL 145839 --- src/com/android/camera/CameraSettings.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/com/android/camera/CameraSettings.java') 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(); } } } -- cgit v1.1