summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2016-06-07 14:23:31 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-21 18:45:51 -0700
commit2df470fb509b0f03ea6b541c7f2e144db516444a (patch)
tree7cc1202674c9d37a4428767d31eefa45adab9117
parent8efa34872e0000481293f979cf5d0094067ad574 (diff)
downloadandroid_packages_apps_Snap-2df470fb509b0f03ea6b541c7f2e144db516444a.zip
android_packages_apps_Snap-2df470fb509b0f03ea6b541c7f2e144db516444a.tar.gz
android_packages_apps_Snap-2df470fb509b0f03ea6b541c7f2e144db516444a.tar.bz2
SnapdragonCamera: Filter duplicate picture resolution
Filter picture resolution with duplicate name. There can be 2 different picture resolutions with the same name. Take only the first one. Change-Id: I9a472d958b829d3dce9559d4fcacb5d0dfd3e598 CRs-Fixed: 1025767
-rw-r--r--src/com/android/camera/CameraSettings.java2
-rw-r--r--src/com/android/camera/SettingsManager.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index e7e3c0e..6d8778b 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -1129,7 +1129,7 @@ public class CameraSettings {
resetIfInvalid(pref);
}
- private void filterSimilarPictureSize(PreferenceGroup group,
+ public static void filterSimilarPictureSize(PreferenceGroup group,
ListPreference pref) {
pref.filterDuplicated();
if (pref.getEntries().length <= 1) {
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java
index 3a5f6f7..095c5d8 100644
--- a/src/com/android/camera/SettingsManager.java
+++ b/src/com/android/camera/SettingsManager.java
@@ -518,6 +518,7 @@ public class SettingsManager implements ListMenu.SettingsListener {
if (pictureSize != null) {
CameraSettings.filterUnsupportedOptions(mPreferenceGroup,
pictureSize, getSupportedPictureSize(cameraId));
+ CameraSettings.filterSimilarPictureSize(mPreferenceGroup, pictureSize);
}
if (exposure != null) buildExposureCompensation(cameraId);