diff options
author | Cheng-Ru Lin <owenlin@google.com> | 2009-09-30 04:37:18 +0800 |
---|---|---|
committer | Cheng-Ru Lin <owenlin@google.com> | 2009-09-30 06:16:46 +0800 |
commit | 7af25641ec401d9f669497bd401020f2cb5933ef (patch) | |
tree | 901ed14669d2a83f54022d72642242d4dda589c0 /src/com/android/camera/CameraSettings.java | |
parent | 121c88051d51739cab5c5ed968e1bf2c97f35a01 (diff) | |
download | LegacyCamera-7af25641ec401d9f669497bd401020f2cb5933ef.zip LegacyCamera-7af25641ec401d9f669497bd401020f2cb5933ef.tar.gz LegacyCamera-7af25641ec401d9f669497bd401020f2cb5933ef.tar.bz2 |
Revert "Add icon support for options in preference setting screen."
This reverts commit 723f84eadb3c1a79337ef20e4d0a014341537adb.
Conflicts:
res/values/arrays.xml
res/xml/camera_preferences.xml
src/com/android/camera/IconListPreference.java
Change-Id: Ic5fd32735656cfaed56cf256a0b9530d051f2240
Diffstat (limited to 'src/com/android/camera/CameraSettings.java')
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index e4737be..d81756d 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -3,7 +3,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.os.SystemProperties; @@ -188,29 +187,19 @@ public class CameraSettings { // Prepare setting entries and entry values. CharSequence[] allEntries = pref.getEntries(); 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.setEntries(entries.toArray(new CharSequence[entries.size()])); + pref.setEntryValues(entryValues.toArray( + new CharSequence[entryValues.size()])); // Set the value to the first entry if it is invalid. String value = pref.getValue(); |