From 22216b6cc942fc3a97b99d6bce4b1a86f19c08d4 Mon Sep 17 00:00:00 2001 From: Wu-cheng Li Date: Tue, 12 Oct 2010 16:27:27 +0800 Subject: Do not show the setting if there is only one supported option. bug:3064986 Change-Id: I1d3a8cff955d203c2a055ee596f30035001a5c63 --- src/com/android/camera/CameraSettings.java | 4 ++++ 1 file changed, 4 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 2c6bdf14..f4f27e63 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -282,6 +282,10 @@ public class CameraSettings { } pref.filterUnsupported(supported); + if (pref.getEntries().length <= 1) { + removePreference(group, pref.getKey()); + return; + } // Set the value to the first entry if it is invalid. String value = pref.getValue(); -- cgit v1.2.3