summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2014-10-16 22:08:17 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-16 22:08:17 +0000
commit4a43a107d7b70444d21aaf98fac7381e3adac7b5 (patch)
tree3f918f199501617a33ce333d1737b3abe47bab43 /src/com
parent667695eb117c8d1865b12145c5a348e8da5f70e1 (diff)
parentc94382e84e4b899873b1005cb21f1370f8f13319 (diff)
downloadpackages_apps_Settings-4a43a107d7b70444d21aaf98fac7381e3adac7b5.tar.gz
packages_apps_Settings-4a43a107d7b70444d21aaf98fac7381e3adac7b5.tar.bz2
packages_apps_Settings-4a43a107d7b70444d21aaf98fac7381e3adac7b5.zip
Merge "Fix bug #18017952 It does not search all possible "USB" results that can be found in the settings" into lmp-mr1-dev
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/search/Ranking.java8
-rw-r--r--src/com/android/settings/search/SearchIndexableResources.java8
2 files changed, 13 insertions, 3 deletions
diff --git a/src/com/android/settings/search/Ranking.java b/src/com/android/settings/search/Ranking.java
index 2c7600297..6abbc3d45 100644
--- a/src/com/android/settings/search/Ranking.java
+++ b/src/com/android/settings/search/Ranking.java
@@ -31,6 +31,7 @@ import com.android.settings.WirelessSettings;
import com.android.settings.accessibility.AccessibilitySettings;
import com.android.settings.bluetooth.BluetoothSettings;
import com.android.settings.deviceinfo.Memory;
+import com.android.settings.deviceinfo.UsbSettings;
import com.android.settings.fuelgauge.BatterySaverSettings;
import com.android.settings.fuelgauge.PowerUsageSummary;
import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
@@ -63,7 +64,7 @@ public final class Ranking {
public static final int RANK_DISPLAY = 7;
public static final int RANK_WALLPAPER = 8;
public static final int RANK_NOTIFICATIONS = 9;
- public static final int RANK_MEMORY = 10;
+ public static final int RANK_STORAGE = 10;
public static final int RANK_POWER_USAGE = 11;
public static final int RANK_USERS = 12;
public static final int RANK_LOCATION = 13;
@@ -118,8 +119,9 @@ public final class Ranking {
sRankMap.put(OtherSoundSettings.class.getName(), RANK_NOTIFICATIONS);
sRankMap.put(ZenModeSettings.class.getName(), RANK_NOTIFICATIONS);
- // Memory
- sRankMap.put(Memory.class.getName(), RANK_MEMORY);
+ // Storage
+ sRankMap.put(Memory.class.getName(), RANK_STORAGE);
+ sRankMap.put(UsbSettings.class.getName(), RANK_STORAGE);
// Battery
sRankMap.put(PowerUsageSummary.class.getName(), RANK_POWER_USAGE);
diff --git a/src/com/android/settings/search/SearchIndexableResources.java b/src/com/android/settings/search/SearchIndexableResources.java
index 105ce7ef1..3051fd206 100644
--- a/src/com/android/settings/search/SearchIndexableResources.java
+++ b/src/com/android/settings/search/SearchIndexableResources.java
@@ -33,6 +33,7 @@ import com.android.settings.WirelessSettings;
import com.android.settings.accessibility.AccessibilitySettings;
import com.android.settings.bluetooth.BluetoothSettings;
import com.android.settings.deviceinfo.Memory;
+import com.android.settings.deviceinfo.UsbSettings;
import com.android.settings.fuelgauge.BatterySaverSettings;
import com.android.settings.fuelgauge.PowerUsageSummary;
import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
@@ -165,6 +166,13 @@ public final class SearchIndexableResources {
Memory.class.getName(),
R.drawable.ic_settings_storage));
+ sResMap.put(UsbSettings.class.getName(),
+ new SearchIndexableResource(
+ Ranking.getRankForClassName(UsbSettings.class.getName()),
+ R.xml.usb_settings,
+ UsbSettings.class.getName(),
+ R.drawable.ic_settings_storage));
+
sResMap.put(PowerUsageSummary.class.getName(),
new SearchIndexableResource(
Ranking.getRankForClassName(PowerUsageSummary.class.getName()),