diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index c2b01cf..206865f 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -386,16 +386,13 @@
         // Cache the search query (can be overriden by the OnQueryTextListener)
         final String query = mSearchQuery;
 
-        // Associate searchable configuration with the SearchView
-        SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
-        mSearchView = (SearchView) menu.findItem(R.id.search).getActionView();
+        mSearchMenuItem = menu.findItem(R.id.search);
+        mSearchView = (SearchView) mSearchMenuItem.getActionView();
 
+        mSearchMenuItem.setOnActionExpandListener(this);
         mSearchView.setOnQueryTextListener(this);
         mSearchView.setOnCloseListener(this);
 
-        mSearchMenuItem = menu.findItem(R.id.search);
-        mSearchMenuItem.setOnActionExpandListener(this);
-
         if (mSearchMenuItemExpanded) {
             mSearchMenuItem.expandActionView();
         }
diff --git a/src/com/android/settings/dashboard/SearchResultsSummary.java b/src/com/android/settings/dashboard/SearchResultsSummary.java
index 992bb59..41d8609 100644
--- a/src/com/android/settings/dashboard/SearchResultsSummary.java
+++ b/src/com/android/settings/dashboard/SearchResultsSummary.java
@@ -195,14 +195,17 @@
 
     private static class SearchResult {
         public String title;
-        public String summary;
+        public String summaryOn;
+        public String summaryOff;
         public int iconResId;
         public Context context;
 
-        public SearchResult(Context context, String title, String summary, int iconResId) {
+        public SearchResult(Context context, String title, String summaryOn, String summaryOff,
+                int iconResId) {
             this.context = context;
             this.title = title;
-            this.summary = summary;
+            this.summaryOn = summaryOn;
+            this.summaryOff = summaryOff;
             this.iconResId = iconResId;
         }
     }
@@ -247,7 +250,8 @@
         public Object getItem(int position) {
             if (mDataValid && mCursor.moveToPosition(position)) {
                 final String title = mCursor.getString(Index.COLUMN_INDEX_TITLE);
-                final String summary = mCursor.getString(Index.COLUMN_INDEX_SUMMARY);
+                final String summaryOn = mCursor.getString(Index.COLUMN_INDEX_SUMMARY_ON);
+                final String summaryOff = mCursor.getString(Index.COLUMN_INDEX_SUMMARY_OFF);
                 final String iconResStr = mCursor.getString(Index.COLUMN_INDEX_ICON);
                 final String className = mCursor.getString(
                         Index.COLUMN_INDEX_CLASS_NAME);
@@ -271,7 +275,7 @@
                 }
                 final int iconResId = TextUtils.isEmpty(iconResStr) ?
                         R.drawable.empty_icon : Integer.parseInt(iconResStr);
-                return new SearchResult(packageContext, title, summary, iconResId);
+                return new SearchResult(packageContext, title, summaryOn, summaryOff, iconResId);
             }
             return null;
         }
@@ -308,7 +312,12 @@
             SearchResult result = (SearchResult) getItem(position);
 
             textTitle.setText(result.title);
-            textSummary.setText(result.summary);
+            final StringBuilder sb = new StringBuilder(result.summaryOn);
+            if (!TextUtils.isEmpty(result.summaryOff)) {
+                sb.append(" | ");
+                sb.append(result.summaryOff);
+            }
+            textSummary.setText(sb.toString());
             if (result.iconResId != R.drawable.empty_icon) {
                 final Context packageContext = result.context;
                 final Drawable drawable;
diff --git a/src/com/android/settings/search/Index.java b/src/com/android/settings/search/Index.java
index 6ac5196..bfeedc9 100644
--- a/src/com/android/settings/search/Index.java
+++ b/src/com/android/settings/search/Index.java
@@ -58,34 +58,39 @@
 
     // Those indices should match the indices of SELECT_COLUMNS !
     public static final int COLUMN_INDEX_TITLE = 1;
-    public static final int COLUMN_INDEX_SUMMARY = 2;
-    public static final int COLUMN_INDEX_CLASS_NAME = 4;
-    public static final int COLUMN_INDEX_SCREEN_TITLE = 5;
-    public static final int COLUMN_INDEX_ICON = 6;
-    public static final int COLUMN_INDEX_INTENT_ACTION = 7;
-    public static final int COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE = 8;
-    public static final int COLUMN_INDEX_INTENT_ACTION_TARGET_CLASS = 9;
-    public static final int COLUMN_INDEX_ENABLED = 10;
+    public static final int COLUMN_INDEX_SUMMARY_ON = 2;
+    public static final int COLUMN_INDEX_SUMMARY_OFF = 3;
+    public static final int COLUMN_INDEX_KEYWORDS = 4;
+    public static final int COLUMN_INDEX_CLASS_NAME = 5;
+    public static final int COLUMN_INDEX_SCREEN_TITLE = 6;
+    public static final int COLUMN_INDEX_ICON = 7;
+    public static final int COLUMN_INDEX_INTENT_ACTION = 8;
+    public static final int COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE = 9;
+    public static final int COLUMN_INDEX_INTENT_ACTION_TARGET_CLASS = 10;
+    public static final int COLUMN_INDEX_ENABLED = 11;
 
     // If you change the order of columns here, you SHOULD change the COLUMN_INDEX_XXX values
     private static final String[] SELECT_COLUMNS = new String[] {
-            IndexColumns.DATA_RANK,
-            IndexColumns.DATA_TITLE,
-            IndexColumns.DATA_SUMMARY,
-            IndexColumns.DATA_KEYWORDS,
-            IndexColumns.CLASS_NAME,
-            IndexColumns.SCREEN_TITLE,
-            IndexColumns.ICON,
-            IndexColumns.INTENT_ACTION,
-            IndexColumns.INTENT_TARGET_PACKAGE,
-            IndexColumns.INTENT_TARGET_CLASS
+            IndexColumns.DATA_RANK,               // 0
+            IndexColumns.DATA_TITLE,              // 1
+            IndexColumns.DATA_SUMMARY_ON,         // 2
+            IndexColumns.DATA_SUMMARY_OFF,        // 3
+            IndexColumns.DATA_KEYWORDS,           // 4
+            IndexColumns.CLASS_NAME,              // 5
+            IndexColumns.SCREEN_TITLE,            // 6
+            IndexColumns.ICON,                    // 7
+            IndexColumns.INTENT_ACTION,           // 8
+            IndexColumns.INTENT_TARGET_PACKAGE,   // 9
+            IndexColumns.INTENT_TARGET_CLASS      // 10
     };
 
     private static final String[] MATCH_COLUMNS = {
             IndexColumns.DATA_TITLE,
             IndexColumns.DATA_TITLE_NORMALIZED,
-            IndexColumns.DATA_SUMMARY,
-            IndexColumns.DATA_SUMMARY_NORMALIZED,
+            IndexColumns.DATA_SUMMARY_ON,
+            IndexColumns.DATA_SUMMARY_ON_NORMALIZED,
+            IndexColumns.DATA_SUMMARY_OFF,
+            IndexColumns.DATA_SUMMARY_OFF_NORMALIZED,
             IndexColumns.DATA_KEYWORDS
     };
 
@@ -93,6 +98,12 @@
     private static final String NON_BREAKING_HYPHEN = "\u2011";
     private static final String HYPHEN = "-";
 
+    private static final String FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER =
+            "SEARCH_INDEX_DATA_PROVIDER";
+
+    private static final String NODE_NAME_PREFERENCE_SCREEN = "PreferenceScreen";
+    private static final String NODE_NAME_CHECK_BOX_PREFERENCE = "CheckBoxPreference";
+
     private static Index sInstance;
     private final AtomicBoolean mIsAvailable = new AtomicBoolean(false);
     private final UpdateData mDataToProcess = new UpdateData();
@@ -335,22 +346,24 @@
                 while (cursor.moveToNext()) {
                     final int rank = cursor.getInt(0);
                     final String title = cursor.getString(1);
-                    final String summary = cursor.getString(2);
-                    final String keywords = cursor.getString(3);
+                    final String summaryOn = cursor.getString(2);
+                    final String summaryOff = cursor.getString(3);
+                    final String keywords = cursor.getString(4);
 
-                    final String screenTitle = cursor.getString(4);
+                    final String screenTitle = cursor.getString(5);
 
-                    final String className = cursor.getString(5);
-                    final int iconResId = cursor.getInt(6);
+                    final String className = cursor.getString(6);
+                    final int iconResId = cursor.getInt(7);
 
-                    final String action = cursor.getString(7);
-                    final String targetPackage = cursor.getString(8);
-                    final String targetClass = cursor.getString(9);
+                    final String action = cursor.getString(8);
+                    final String targetPackage = cursor.getString(9);
+                    final String targetClass = cursor.getString(10);
 
                     SearchIndexableRaw data = new SearchIndexableRaw(packageContext);
                     data.rank = rank;
                     data.title = title;
-                    data.summary = summary;
+                    data.summaryOn = summaryOn;
+                    data.summaryOff = summaryOff;
                     data.keywords = keywords;
                     data.screenTitle = screenTitle;
                     data.className = className;
@@ -458,7 +471,7 @@
             }
 
             String nodeName = parser.getName();
-            if (!"PreferenceScreen".equals(nodeName)) {
+            if (!NODE_NAME_PREFERENCE_SCREEN.equals(nodeName)) {
                 throw new RuntimeException(
                         "XML document must start with <PreferenceScreen> tag; found"
                                 + nodeName + " at " + parser.getPositionDescription());
@@ -474,7 +487,7 @@
 
             // Insert rows for the main PreferenceScreen node. Rewrite the data for removing
             // hyphens.
-            updateOneRowWithFilteredData(database, localeStr, title, summary, fragmentName,
+            updateOneRowWithFilteredData(database, localeStr, title, summary, null, fragmentName,
                     screenTitle, iconResId, rank, keywords,
                     intentAction, intentTargetPackage, intentTargetClass, true);
 
@@ -484,14 +497,26 @@
                     continue;
                 }
 
+                nodeName = parser.getName();
+
                 title = getDataTitle(context, attrs);
-                summary = getDataSummary(context, attrs);
                 keywords = getDataKeywords(context, attrs);
 
-                // Insert rows for the child nodes of PreferenceScreen
-                updateOneRowWithFilteredData(database, localeStr, title, summary, fragmentName,
-                        screenTitle, iconResId, rank, keywords,
-                        intentAction, intentTargetPackage, intentTargetClass, true);
+                if (!nodeName.equals(NODE_NAME_CHECK_BOX_PREFERENCE)) {
+                    summary = getDataSummary(context, attrs);
+
+                    // Insert rows for the child nodes of PreferenceScreen
+                    updateOneRowWithFilteredData(database, localeStr, title, summary, null,
+                            fragmentName, screenTitle, iconResId, rank, keywords,
+                            intentAction, intentTargetPackage, intentTargetClass, true);
+                } else {
+                    final String summaryOn = getDataSummaryOn(context, attrs);
+                    final String summaryOff = getDataSummaryOff(context, attrs);
+
+                    updateOneRowWithFilteredData(database, localeStr, title, summaryOn, summaryOff,
+                            fragmentName, screenTitle, iconResId, rank, keywords,
+                            intentAction, intentTargetPackage, intentTargetClass, true);
+                }
             }
 
         } catch (XmlPullParserException e) {
@@ -512,7 +537,8 @@
 
         updateOneRowWithFilteredData(database, localeStr,
                 raw.title,
-                raw.summary,
+                raw.summaryOn,
+                raw.summaryOff,
                 raw.className,
                 raw.screenTitle,
                 raw.iconResId,
@@ -529,7 +555,7 @@
         try {
             final Class<?> clazz = Class.forName(sir.className);
             if (Indexable.class.isAssignableFrom(clazz)) {
-                final Field f = clazz.getField("SEARCH_INDEX_DATA_PROVIDER");
+                final Field f = clazz.getField(FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER);
                 final Indexable.SearchIndexProvider provider =
                         (Indexable.SearchIndexProvider) f.get(null);
 
@@ -547,7 +573,8 @@
 
                         updateOneRowWithFilteredData(database, localeStr,
                                 raw.title,
-                                raw.summary,
+                                raw.summaryOn,
+                                raw.summaryOff,
                                 sir.className,
                                 raw.screenTitle,
                                 sir.iconResId,
@@ -582,14 +609,15 @@
         } catch (ClassNotFoundException e) {
             Log.e(LOG_TAG, "Cannot find class: " + sir.className, e);
         } catch (NoSuchFieldException e) {
-            Log.e(LOG_TAG, "Cannot find field 'SEARCH_INDEX_DATA_PROVIDER'", e);
+            Log.e(LOG_TAG, "Cannot find field '" + FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER + "'", e);
         } catch (IllegalAccessException e) {
-            Log.e(LOG_TAG, "Illegal access to field 'SEARCH_INDEX_DATA_PROVIDER'", e);
+            Log.e(LOG_TAG,
+                    "Illegal access to field '" + FIELD_NAME_SEARCH_INDEX_DATA_PROVIDER + "'", e);
         }
     }
 
     private void updateOneRowWithFilteredData(SQLiteDatabase database, String locale,
-            String title, String summary, String className, String screenTitle,
+            String title, String summaryOn, String summaryOff, String className, String screenTitle,
             int iconResId, int rank, String keywords,
             String intentAction, String intentTargetPackage, String intentTargetClass,
             boolean enabled) {
@@ -602,27 +630,35 @@
             updatedTitle = EMPTY;
         }
 
-        String updatedSummary;
-        if (summary != null) {
-            updatedSummary = summary.replaceAll(NON_BREAKING_HYPHEN, HYPHEN);
+        String updatedSummaryOn;
+        if (summaryOn != null) {
+            updatedSummaryOn = summaryOn.replaceAll(NON_BREAKING_HYPHEN, HYPHEN);
         } else {
-            updatedSummary = EMPTY;
+            updatedSummaryOn = EMPTY;
+        }
+
+        String updatedSummaryOff;
+        if (summaryOff != null) {
+            updatedSummaryOff = summaryOff.replaceAll(NON_BREAKING_HYPHEN, HYPHEN);
+        } else {
+            updatedSummaryOff = EMPTY;
         }
 
         String normalizedTitle = updatedTitle.replaceAll(HYPHEN, EMPTY);
-        String normalizedSummary = updatedSummary.replaceAll(HYPHEN, EMPTY);
+        String normalizedSummaryOn = updatedSummaryOn.replaceAll(HYPHEN, EMPTY);
+        String normalizedSummaryOff = updatedSummaryOff.replaceAll(HYPHEN, EMPTY);
 
         updateOneRow(database, locale,
-                updatedTitle, normalizedTitle, updatedSummary, normalizedSummary,
-                className, screenTitle, iconResId, rank, keywords,
-                intentAction, intentTargetPackage, intentTargetClass, enabled);
+                updatedTitle, normalizedTitle, updatedSummaryOn, normalizedSummaryOn,
+                updatedSummaryOff, normalizedSummaryOff, className, screenTitle, iconResId,
+                rank, keywords, intentAction, intentTargetPackage, intentTargetClass, enabled);
     }
 
     private void updateOneRow(SQLiteDatabase database, String locale,
             String updatedTitle, String normalizedTitle,
-            String updatedSummary, String normalizedSummary,
-            String className, String screenTitle,
-            int iconResId, int rank, String keywords,
+            String updatedSummaryOn, String normalizedSummaryOn,
+            String updatedSummaryOff, String normalizedSummaryOff, String className,
+            String screenTitle, int iconResId, int rank, String keywords,
             String intentAction, String intentTargetPackage, String intentTargetClass,
             boolean enabled) {
 
@@ -636,8 +672,10 @@
         values.put(IndexColumns.DATA_RANK, rank);
         values.put(IndexColumns.DATA_TITLE, updatedTitle);
         values.put(IndexColumns.DATA_TITLE_NORMALIZED, normalizedTitle);
-        values.put(IndexColumns.DATA_SUMMARY, updatedSummary);
-        values.put(IndexColumns.DATA_SUMMARY_NORMALIZED, normalizedSummary);
+        values.put(IndexColumns.DATA_SUMMARY_ON, updatedSummaryOn);
+        values.put(IndexColumns.DATA_SUMMARY_ON_NORMALIZED, normalizedSummaryOn);
+        values.put(IndexColumns.DATA_SUMMARY_OFF, updatedSummaryOff);
+        values.put(IndexColumns.DATA_SUMMARY_OFF_NORMALIZED, normalizedSummaryOff);
         values.put(IndexColumns.DATA_KEYWORDS, keywords);
         values.put(IndexColumns.CLASS_NAME, className);
         values.put(IndexColumns.SCREEN_TITLE, screenTitle);
@@ -662,6 +700,18 @@
                 com.android.internal.R.styleable.Preference_summary);
     }
 
+    private String getDataSummaryOn(Context context, AttributeSet attrs) {
+        return getData(context, attrs,
+                com.android.internal.R.styleable.CheckBoxPreference,
+                com.android.internal.R.styleable.CheckBoxPreference_summaryOn);
+    }
+
+    private String getDataSummaryOff(Context context, AttributeSet attrs) {
+        return getData(context, attrs,
+                com.android.internal.R.styleable.CheckBoxPreference,
+                com.android.internal.R.styleable.CheckBoxPreference_summaryOff);
+    }
+
     private String getDataKeywords(Context context, AttributeSet attrs) {
         return getData(context, attrs, R.styleable.Preference, R.styleable.Preference_keywords);
     }
diff --git a/src/com/android/settings/search/IndexDatabaseHelper.java b/src/com/android/settings/search/IndexDatabaseHelper.java
index 24d40a7..88ac4e7 100644
--- a/src/com/android/settings/search/IndexDatabaseHelper.java
+++ b/src/com/android/settings/search/IndexDatabaseHelper.java
@@ -28,7 +28,7 @@
     private static final String TAG = "IndexDatabaseHelper";
 
     private static final String DATABASE_NAME = "search_index.db";
-    private static final int DATABASE_VERSION = 103;
+    private static final int DATABASE_VERSION = 104;
 
     public interface Tables {
         public static final String TABLE_PREFS_INDEX = "prefs_index";
@@ -41,8 +41,10 @@
         public static final String DATA_RANK = "data_rank";
         public static final String DATA_TITLE = "data_title";
         public static final String DATA_TITLE_NORMALIZED = "data_title_normalized";
-        public static final String DATA_SUMMARY = "data_summary";
-        public static final String DATA_SUMMARY_NORMALIZED = "data_summary_normalized";
+        public static final String DATA_SUMMARY_ON = "data_summary_on";
+        public static final String DATA_SUMMARY_ON_NORMALIZED = "data_summary_on_normalized";
+        public static final String DATA_SUMMARY_OFF = "data_summary_off";
+        public static final String DATA_SUMMARY_OFF_NORMALIZED = "data_summary_off_normalized";
         public static final String DATA_KEYWORDS = "data_keywords";
         public static final String CLASS_NAME = "class_name";
         public static final String SCREEN_TITLE = "screen_title";
@@ -68,9 +70,13 @@
                     ", " +
                     IndexColumns.DATA_TITLE_NORMALIZED +
                     ", " +
-                    IndexColumns.DATA_SUMMARY +
+                    IndexColumns.DATA_SUMMARY_ON +
                     ", " +
-                    IndexColumns.DATA_SUMMARY_NORMALIZED +
+                    IndexColumns.DATA_SUMMARY_ON_NORMALIZED +
+                    ", " +
+                    IndexColumns.DATA_SUMMARY_OFF +
+                    ", " +
+                    IndexColumns.DATA_SUMMARY_OFF_NORMALIZED +
                     ", " +
                     IndexColumns.DATA_KEYWORDS +
                     ", " +
@@ -129,9 +135,9 @@
 
     @Override
     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
-        if (oldVersion == 100 || oldVersion == 101 || oldVersion == 102) {
-            Log.w(TAG, "Detected schema version 100, 101 or 102. " +
-                    "Index needs to be rebuilt for schema version 103");
+        if (oldVersion == 100 || oldVersion == 101 || oldVersion == 102 || oldVersion == 103) {
+            Log.w(TAG, "Detected schema version 100, 101, 102 or 103. " +
+                    "Index needs to be rebuilt for schema version 104");
             // We need to drop the tables and recreate them
             dropTables(db);
             bootstrapDB(db);
diff --git a/src/com/android/settings/search/SearchIndexableRaw.java b/src/com/android/settings/search/SearchIndexableRaw.java
index a175be9..e800535 100644
--- a/src/com/android/settings/search/SearchIndexableRaw.java
+++ b/src/com/android/settings/search/SearchIndexableRaw.java
@@ -29,7 +29,8 @@
 public class SearchIndexableRaw extends SearchIndexableData {
 
     public String title;
-    public String summary;
+    public String summaryOn;
+    public String summaryOff;
     public String keywords;
 
     public String screenTitle;
diff --git a/src/com/android/settings/search/SearchIndexableResources.java b/src/com/android/settings/search/SearchIndexableResources.java
index c65e50c..061be54 100644
--- a/src/com/android/settings/search/SearchIndexableResources.java
+++ b/src/com/android/settings/search/SearchIndexableResources.java
@@ -22,6 +22,8 @@
 import com.android.settings.DeviceInfoSettings;
 import com.android.settings.DisplaySettings;
 import com.android.settings.HomeSettings;
+import com.android.settings.NotificationAccessSettings;
+import com.android.settings.NotificationSettings;
 import com.android.settings.PrivacySettings;
 import com.android.settings.R;
 import com.android.settings.SecuritySettings;
@@ -47,110 +49,137 @@
 
     private static int NO_DATA_RES_ID = 0;
 
+    private static final int RANK_WIFI = 1;
+    private static final int RANK_BT = 2;
+    private static final int RANK_DATA_USAGE = 3;
+    private static final int RANK_WIRELESS = 4;
+    private static final int RANK_HOME = 5;
+    private static final int RANK_SOUND = 6;
+    private static final int RANK_DISPLAY = 7;
+    private static final int RANK_WALLPAPER = 7;
+    private static final int RANK_NOTIFICATIONS = 8;
+    private static final int RANK_MEMORY = 9;
+    private static final int RANK_POWER_USAGE = 10;
+    private static final int RANK_USERS = 11;
+    private static final int RANK_LOCATION = 12;
+    private static final int RANK_SECURITY = 13;
+    private static final int RANK_IME = 14;
+    private static final int RANK_PRIVACY = 15;
+    private static final int RANK_DATE_TIME = 16;
+    private static final int RANK_ACCESSIBILITY = 17;
+    private static final int RANK_PRINTING = 18;
+    private static final int RANK_DEVELOPEMENT = 19;
+    private static final int RANK_DEVICE_INFO = 20;
+
     private static HashMap<String, SearchIndexableResource> sResMap =
             new HashMap<String, SearchIndexableResource>();
 
 
     static {
         sResMap.put(WifiSettings.class.getName(),
-                new SearchIndexableResource(1,
+                new SearchIndexableResource(RANK_WIFI,
                         NO_DATA_RES_ID,
                         WifiSettings.class.getName(),
                         R.drawable.ic_settings_wireless));
 
         sResMap.put(BluetoothSettings.class.getName(),
-                new SearchIndexableResource(2,
+                new SearchIndexableResource(RANK_BT,
                         NO_DATA_RES_ID,
                         BluetoothSettings.class.getName(),
                         R.drawable.ic_settings_bluetooth2));
 
         sResMap.put(DataUsageMeteredSettings.class.getName(),
-                new SearchIndexableResource(3, R.xml.data_usage_metered_prefs,
+                new SearchIndexableResource(RANK_DATA_USAGE, R.xml.data_usage_metered_prefs,
                         DataUsageMeteredSettings.class.getName(),
                         R.drawable.ic_settings_data_usage));
 
         sResMap.put(WirelessSettings.class.getName(),
-                new SearchIndexableResource(4, R.xml.wireless_settings,
+                new SearchIndexableResource(RANK_WIRELESS, R.xml.wireless_settings,
                         WirelessSettings.class.getName(),
                         R.drawable.empty_icon));
 
         sResMap.put(HomeSettings.class.getName(),
-                new SearchIndexableResource(5, R.xml.home_selection,
+                new SearchIndexableResource(RANK_HOME, R.xml.home_selection,
                         HomeSettings.class.getName(),
                         R.drawable.ic_settings_home));
 
         sResMap.put(SoundSettings.class.getName(),
-                new SearchIndexableResource(6, R.xml.sound_settings,
+                new SearchIndexableResource(RANK_SOUND, R.xml.sound_settings,
                         SoundSettings.class.getName(),
                         R.drawable.ic_settings_sound));
 
         sResMap.put(DisplaySettings.class.getName(),
-                new SearchIndexableResource(7, R.xml.display_settings,
+                new SearchIndexableResource(RANK_DISPLAY, R.xml.display_settings,
                         DisplaySettings.class.getName(),
                         R.drawable.ic_settings_display));
 
         sResMap.put(WallpaperTypeSettings.class.getName(),
-                new SearchIndexableResource(7, NO_DATA_RES_ID,
+                new SearchIndexableResource(RANK_WALLPAPER, NO_DATA_RES_ID,
                         WallpaperTypeSettings.class.getName(),
                         R.drawable.ic_settings_display));
 
+        sResMap.put(NotificationSettings.class.getName(),
+                new SearchIndexableResource(RANK_NOTIFICATIONS, R.xml.notification_settings,
+                        NotificationSettings.class.getName(),
+                        R.drawable.ic_settings_notifications));
+
         sResMap.put(Memory.class.getName(),
-                new SearchIndexableResource(8, R.xml.device_info_memory,
+                new SearchIndexableResource(RANK_MEMORY, R.xml.device_info_memory,
                         Memory.class.getName(),
                         R.drawable.ic_settings_storage));
 
         sResMap.put(PowerUsageSummary.class.getName(),
-                new SearchIndexableResource(9, R.xml.power_usage_summary,
+                new SearchIndexableResource(RANK_POWER_USAGE, R.xml.power_usage_summary,
                         PowerUsageSummary.class.getName(),
                         R.drawable.ic_settings_battery));
 
         sResMap.put(UserSettings.class.getName(),
-                new SearchIndexableResource(10, R.xml.user_settings,
+                new SearchIndexableResource(RANK_USERS, R.xml.user_settings,
                         UserSettings.class.getName(),
                         R.drawable.ic_settings_multiuser));
 
         sResMap.put(LocationSettings.class.getName(),
-                new SearchIndexableResource(11, R.xml.location_settings,
+                new SearchIndexableResource(RANK_LOCATION, R.xml.location_settings,
                         LocationSettings.class.getName(),
                         R.drawable.ic_settings_location));
 
         sResMap.put(SecuritySettings.class.getName(),
-                new SearchIndexableResource(12, R.xml.security_settings,
+                new SearchIndexableResource(RANK_SECURITY, R.xml.security_settings,
                         SecuritySettings.class.getName(),
                         R.drawable.ic_settings_security));
 
         sResMap.put(InputMethodAndLanguageSettings.class.getName(),
-                new SearchIndexableResource(13, R.xml.language_settings,
+                new SearchIndexableResource(RANK_IME, R.xml.language_settings,
                         InputMethodAndLanguageSettings.class.getName(),
                         R.drawable.ic_settings_language));
 
         sResMap.put(PrivacySettings.class.getName(),
-                new SearchIndexableResource(14, R.xml.privacy_settings,
+                new SearchIndexableResource(RANK_PRIVACY, R.xml.privacy_settings,
                         PrivacySettings.class.getName(),
                         R.drawable.ic_settings_backup));
 
         sResMap.put(DateTimeSettings.class.getName(),
-                new SearchIndexableResource(15, R.xml.date_time_prefs,
+                new SearchIndexableResource(RANK_DATE_TIME, R.xml.date_time_prefs,
                         DateTimeSettings.class.getName(),
                         R.drawable.ic_settings_date_time));
 
         sResMap.put(AccessibilitySettings.class.getName(),
-                new SearchIndexableResource(16, R.xml.accessibility_settings,
+                new SearchIndexableResource(RANK_ACCESSIBILITY, R.xml.accessibility_settings,
                         AccessibilitySettings.class.getName(),
                         R.drawable.ic_settings_accessibility));
 
         sResMap.put(PrintSettingsFragment.class.getName(),
-                new SearchIndexableResource(17, R.xml.print_settings,
+                new SearchIndexableResource(RANK_PRINTING, R.xml.print_settings,
                         PrintSettingsFragment.class.getName(),
                         com.android.internal.R.drawable.ic_print));
 
         sResMap.put(DevelopmentSettings.class.getName(),
-                new SearchIndexableResource(18, R.xml.development_prefs,
+                new SearchIndexableResource(RANK_DEVELOPEMENT, R.xml.development_prefs,
                         DevelopmentSettings.class.getName(),
                         R.drawable.ic_settings_development));
 
         sResMap.put(DeviceInfoSettings.class.getName(),
-                new SearchIndexableResource(19, R.xml.device_info_settings,
+                new SearchIndexableResource(RANK_DEVICE_INFO, R.xml.device_info_settings,
                         DeviceInfoSettings.class.getName(),
                         R.drawable.ic_settings_about));
     }
diff --git a/src/com/android/settings/search/SettingsSearchIndexablesProvider.java b/src/com/android/settings/search/SettingsSearchIndexablesProvider.java
index 453f7a6..603175e 100644
--- a/src/com/android/settings/search/SettingsSearchIndexablesProvider.java
+++ b/src/com/android/settings/search/SettingsSearchIndexablesProvider.java
@@ -20,27 +20,6 @@
 import android.database.MatrixCursor;
 import android.provider.SearchIndexableResource;
 import android.provider.SearchIndexablesProvider;
-import com.android.settings.DateTimeSettings;
-import com.android.settings.DevelopmentSettings;
-import com.android.settings.DeviceInfoSettings;
-import com.android.settings.DisplaySettings;
-import com.android.settings.HomeSettings;
-import com.android.settings.PrivacySettings;
-import com.android.settings.R;
-import com.android.settings.SecuritySettings;
-import com.android.settings.SoundSettings;
-import com.android.settings.WallpaperTypeSettings;
-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.fuelgauge.PowerUsageSummary;
-import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
-import com.android.settings.location.LocationSettings;
-import com.android.settings.net.DataUsageMeteredSettings;
-import com.android.settings.print.PrintSettingsFragment;
-import com.android.settings.users.UserSettings;
-import com.android.settings.wifi.WifiSettings;
 
 import java.util.Collection;
 
