summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2014-06-09 10:13:43 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2014-06-09 10:13:43 -0700
commitd407f2a05c8f8a81d5ea7bf9ad34bd491dc2d742 (patch)
treedcac64809c5a96d760adbf9aed3ad52e14ffc548 /src/com/android
parent38e0a866182c4a534cc33dab2c9fcaab4f8d53cc (diff)
downloadpackages_apps_Settings-d407f2a05c8f8a81d5ea7bf9ad34bd491dc2d742.tar.gz
packages_apps_Settings-d407f2a05c8f8a81d5ea7bf9ad34bd491dc2d742.tar.bz2
packages_apps_Settings-d407f2a05c8f8a81d5ea7bf9ad34bd491dc2d742.zip
Fix DisplaySettings indexing for Search
- was missing the KEY_SCREEN_SAVER case as this Preference can be removed See bug: #12910134 Implement Search into the Settings App Change-Id: I6c6fde41d0208a2e87e7fb1239c0909e034e5b0d
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/settings/DisplaySettings.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index 75236de8c..ae1d8d150 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -299,7 +299,8 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
@Override
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
boolean enabled) {
- ArrayList<SearchIndexableResource> result = new ArrayList<>(1);
+ ArrayList<SearchIndexableResource> result =
+ new ArrayList<SearchIndexableResource>();
SearchIndexableResource sir = new SearchIndexableResource(context);
sir.xmlResId = R.xml.display_settings;
@@ -310,11 +311,15 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
@Override
public List<String> getNonIndexableKeys(Context context) {
- ArrayList<String> nonIndexableKeys = new ArrayList<>(1);
+ ArrayList<String> result = new ArrayList<String>();
+ if (!context.getResources().getBoolean(
+ com.android.internal.R.bool.config_dreamsSupported)) {
+ result.add(KEY_SCREEN_SAVER);
+ }
if (!isAutomaticBrightnessAvailable(context.getResources())) {
- nonIndexableKeys.add(KEY_AUTO_BRIGHTNESS);
+ result.add(KEY_AUTO_BRIGHTNESS);
}
- return nonIndexableKeys;
+ return result;
}
};
}