Merge "Remove Wallpaper duplicate from setting search" into oc-dev

am: 564b965ccc

Change-Id: I955360c67d040a7c05685e8928e54dc6ac1109b6
This commit is contained in:
Matthew Fritze
2017-05-17 17:13:46 +00:00
committed by android-build-merger
4 changed files with 52 additions and 4 deletions

View File

@@ -40,6 +40,7 @@ public class LegalSettings extends SettingsPreferenceFragment implements Indexab
private static final String KEY_LICENSE = "license";
private static final String KEY_COPYRIGHT = "copyright";
private static final String KEY_WEBVIEW_LICENSE = "webview_license";
private static final String KEY_WALLPAPER_ATTRIBUTIONS = "wallpaper_attributions";
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
@@ -76,7 +77,7 @@ public class LegalSettings extends SettingsPreferenceFragment implements Indexab
@Override
public List<String> getNonIndexableKeys(Context context) {
final List<String> keys = new ArrayList<String>();
final List<String> keys = super.getNonIndexableKeys(context);
if (!checkIntentAction(context, "android.settings.TERMS")) {
keys.add(KEY_TERMS);
}
@@ -89,6 +90,7 @@ public class LegalSettings extends SettingsPreferenceFragment implements Indexab
if (!checkIntentAction(context, "android.settings.WEBVIEW_LICENSE")) {
keys.add(KEY_WEBVIEW_LICENSE);
}
keys.add(KEY_WALLPAPER_ATTRIBUTIONS);
return keys;
}

View File

@@ -72,7 +72,7 @@ public class BaseSearchIndexProvider implements Indexable.SearchIndexProvider {
}
return nonIndexableKeys;
} else {
return EMPTY_LIST;
return new ArrayList<>();
}
}