diff options
Diffstat (limited to 'src/com/android/camera/CameraSettings.java')
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index 9641def..5abe73c 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -19,7 +19,6 @@ package com.android.camera; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; -import android.graphics.drawable.Drawable; import android.hardware.Camera.Parameters; import android.hardware.Camera.Size; import android.media.CamcorderProfile; @@ -247,30 +246,7 @@ public class CameraSettings { return; } - CharSequence[] allEntryValues = pref.getEntryValues(); - Drawable[] allIcons = (pref instanceof IconListPreference) - ? ((IconListPreference) pref).getIcons() - : null; - ArrayList<CharSequence> entries = new ArrayList<CharSequence>(); - ArrayList<CharSequence> entryValues = new ArrayList<CharSequence>(); - ArrayList<Drawable> icons = - allIcons == null ? null : new ArrayList<Drawable>(); - for (int i = 0, len = allEntryValues.length; i < len; i++) { - if (supported.indexOf(allEntryValues[i].toString()) != NOT_FOUND) { - entries.add(allEntries[i]); - entryValues.add(allEntryValues[i]); - if (allIcons != null) icons.add(allIcons[i]); - } - } - - // Set entries and entry values to list preference. - int size = entries.size(); - pref.setEntries(entries.toArray(new CharSequence[size])); - pref.setEntryValues(entryValues.toArray(new CharSequence[size])); - if (allIcons != null) { - ((IconListPreference) pref) - .setIcons(icons.toArray(new Drawable[size])); - } + pref.filterUnsupported(supported); // Set the value to the first entry if it is invalid. String value = pref.getValue(); |