summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/camera/SettingsManager.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java
index 8b4ef40..6d7a44d 100755
--- a/src/com/android/camera/SettingsManager.java
+++ b/src/com/android/camera/SettingsManager.java
@@ -355,18 +355,20 @@ public class SettingsManager implements ListMenu.SettingsListener {
}
public void updatePictureAndVideoSize() {
- ListPreference pictureSize = mPreferenceGroup.findPreference(KEY_PICTURE_SIZE);
- ListPreference videoQualityPref = mPreferenceGroup.findPreference(KEY_VIDEO_QUALITY);
+ ListPreference pictureSize = mPreferenceGroup.findPreference(KEY_PICTURE_SIZE);
+ ListPreference videoQualityPref = mPreferenceGroup.findPreference(KEY_VIDEO_QUALITY);
+ if (pictureSize != null) {
CameraSettings.formatPictureSizes(pictureSize,
getSupportedPictureSizeList(getCurrentCameraId()), mContext);
CameraSettings.resetIfInvalid(pictureSize);
- if (videoQualityPref != null) {
- videoQualityPref.setEntries(mContext.getResources().getStringArray(
- R.array.pref_camera2_video_quality_entries));
- videoQualityPref.setEntryValues(mContext.getResources().getStringArray(
- R.array.pref_camera2_video_quality_entryvalues));
- filterUnsupportedOptions(videoQualityPref,getSupportedVideoSize(
- getCurrentCameraId()));
+ }
+ if (videoQualityPref != null) {
+ videoQualityPref.setEntries(mContext.getResources().getStringArray(
+ R.array.pref_camera2_video_quality_entries));
+ videoQualityPref.setEntryValues(mContext.getResources().getStringArray(
+ R.array.pref_camera2_video_quality_entryvalues));
+ filterUnsupportedOptions(videoQualityPref,getSupportedVideoSize(
+ getCurrentCameraId()));
}
}