Remove "data usage" from search.

Fixes: 131324402
Test: verified manually
Change-Id: Ib72902c3eaa1f2427e9c1c835ba2939f28cf7a0d
diff --git a/src/com/android/settings/datausage/DataUsageSummary.java b/src/com/android/settings/datausage/DataUsageSummary.java
index ad4e1e2..c3ffdae 100644
--- a/src/com/android/settings/datausage/DataUsageSummary.java
+++ b/src/com/android/settings/datausage/DataUsageSummary.java
@@ -50,7 +50,6 @@
 /**
  * Settings preference fragment that displays data usage summary.
  */
-@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
 public class DataUsageSummary extends DataUsageBaseFragment implements DataUsageEditController {
 
     private static final String TAG = "DataUsageSummary";
@@ -334,55 +333,4 @@
 
     public static final SummaryLoader.SummaryProviderFactory SUMMARY_PROVIDER_FACTORY
         = SummaryProvider::new;
-
-    /**
-     * For search
-     */
-    public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
-        new BaseSearchIndexProvider() {
-
-            @Override
-            public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
-                    boolean enabled) {
-                List<SearchIndexableResource> resources = new ArrayList<>();
-                SearchIndexableResource resource = new SearchIndexableResource(context);
-                resource.xmlResId = R.xml.data_usage;
-                resources.add(resource);
-
-                resource = new SearchIndexableResource(context);
-                resource.xmlResId = R.xml.data_usage_cellular;
-                resources.add(resource);
-
-                resource = new SearchIndexableResource(context);
-                resource.xmlResId = R.xml.data_usage_wifi;
-                resources.add(resource);
-
-                return resources;
-            }
-
-            @Override
-            public List<String> getNonIndexableKeys(Context context) {
-                List<String> keys = super.getNonIndexableKeys(context);
-
-                if (!DataUsageUtils.hasMobileData(context)) {
-                    keys.add(KEY_MOBILE_USAGE_TITLE);
-                    keys.add(KEY_MOBILE_DATA_USAGE_TOGGLE);
-                    keys.add(KEY_MOBILE_DATA_USAGE);
-                }
-
-                if (!DataUsageUtils.hasWifiRadio(context)) {
-                    keys.add(KEY_WIFI_DATA_USAGE);
-                }
-
-                // This title is named Wifi, and will confuse users.
-                keys.add(KEY_WIFI_USAGE_TITLE);
-
-                // Duplicate entry for "Data saver"
-                keys.add(KEY_RESTRICT_BACKGROUND);
-                // Duplicate entry for "Data warning & limit"
-                keys.add(KEY_MOBILE_BILLING_CYCLE);
-
-                return keys;
-            }
-        };
 }
diff --git a/tests/robotests/assets/grandfather_not_implementing_index_provider b/tests/robotests/assets/grandfather_not_implementing_index_provider
index d7e5585..b950f30 100644
--- a/tests/robotests/assets/grandfather_not_implementing_index_provider
+++ b/tests/robotests/assets/grandfather_not_implementing_index_provider
@@ -28,6 +28,7 @@
 com.android.settings.bluetooth.DevicePickerFragment
 com.android.settings.datausage.AppDataUsage
 com.android.settings.datausage.DataUsageList
+com.android.settings.datausage.DataUsageSummary
 com.android.settings.datetime.timezone.TimeZoneSettings
 com.android.settings.deviceinfo.PrivateVolumeSettings
 com.android.settings.deviceinfo.PublicVolumeSettings