Rename Indexable::getAllPreferenceControllers.

To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).

Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index e726c63..fb5aae0 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -133,7 +133,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null);
                 }
             };
diff --git a/src/com/android/settings/accessibility/VibrationSettings.java b/src/com/android/settings/accessibility/VibrationSettings.java
index 738f218..fedb98c 100644
--- a/src/com/android/settings/accessibility/VibrationSettings.java
+++ b/src/com/android/settings/accessibility/VibrationSettings.java
@@ -86,7 +86,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildControllers(context, null /* lifecycle */);
                 }
diff --git a/src/com/android/settings/applications/AppAndNotificationDashboardFragment.java b/src/com/android/settings/applications/AppAndNotificationDashboardFragment.java
index 7d6bdbb..00640c3 100644
--- a/src/com/android/settings/applications/AppAndNotificationDashboardFragment.java
+++ b/src/com/android/settings/applications/AppAndNotificationDashboardFragment.java
@@ -91,7 +91,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null, null /* host */);
                 }
diff --git a/src/com/android/settings/applications/DefaultAppSettings.java b/src/com/android/settings/applications/DefaultAppSettings.java
index 34b635b..07467ef 100644
--- a/src/com/android/settings/applications/DefaultAppSettings.java
+++ b/src/com/android/settings/applications/DefaultAppSettings.java
@@ -109,7 +109,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context);
                 }
diff --git a/src/com/android/settings/applications/SpecialAccessSettings.java b/src/com/android/settings/applications/SpecialAccessSettings.java
index 4e43c05..3f1ba94 100644
--- a/src/com/android/settings/applications/SpecialAccessSettings.java
+++ b/src/com/android/settings/applications/SpecialAccessSettings.java
@@ -95,7 +95,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context);
                 }
diff --git a/src/com/android/settings/applications/assist/ManageAssist.java b/src/com/android/settings/applications/assist/ManageAssist.java
index 4126aaf..3fbf756 100644
--- a/src/com/android/settings/applications/assist/ManageAssist.java
+++ b/src/com/android/settings/applications/assist/ManageAssist.java
@@ -93,7 +93,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null /* lifecycle */);
                 }
diff --git a/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceDashboardFragment.java b/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceDashboardFragment.java
index 32c2af7..869444d 100644
--- a/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceDashboardFragment.java
+++ b/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceDashboardFragment.java
@@ -28,7 +28,6 @@
 import com.android.settings.connecteddevice.usb.UsbModePreferenceController;
 import com.android.settings.dashboard.DashboardFragment;
 import com.android.settings.nfc.NfcPreferenceController;
-import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.print.PrintSettingPreferenceController;
 import com.android.settings.search.BaseSearchIndexProvider;
 import com.android.settingslib.core.AbstractPreferenceController;
@@ -123,7 +122,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildControllers(context, null /* lifecycle */);
                 }
diff --git a/src/com/android/settings/connecteddevice/usb/UsbDetailsFragment.java b/src/com/android/settings/connecteddevice/usb/UsbDetailsFragment.java
index c861188..3cb568b 100644
--- a/src/com/android/settings/connecteddevice/usb/UsbDetailsFragment.java
+++ b/src/com/android/settings/connecteddevice/usb/UsbDetailsFragment.java
@@ -121,7 +121,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     List<AbstractPreferenceController> ret = new ArrayList<>();
                     ret.addAll(createControllerList(context, new UsbBackend(context), null));
diff --git a/src/com/android/settings/deletionhelper/AutomaticStorageManagerSettings.java b/src/com/android/settings/deletionhelper/AutomaticStorageManagerSettings.java
index 22ecb09..6a3f9d6 100644
--- a/src/com/android/settings/deletionhelper/AutomaticStorageManagerSettings.java
+++ b/src/com/android/settings/deletionhelper/AutomaticStorageManagerSettings.java
@@ -168,7 +168,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context);
                 }
diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
index 1c9e36b..16ad752 100644
--- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
+++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -478,7 +478,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context
+                public List<AbstractPreferenceController> createPreferenceControllers(Context
                         context) {
                     return buildPreferenceControllers(context, null /* activity */,
                             null /* lifecycle */, null /* devOptionsDashboardFragment */,
diff --git a/src/com/android/settings/deviceinfo/DeviceInfoSettings.java b/src/com/android/settings/deviceinfo/DeviceInfoSettings.java
index 79f57be..ac5b549 100644
--- a/src/com/android/settings/deviceinfo/DeviceInfoSettings.java
+++ b/src/com/android/settings/deviceinfo/DeviceInfoSettings.java
@@ -158,7 +158,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null /*activity */,
                             null /* fragment */, null /* lifecycle */);
diff --git a/src/com/android/settings/deviceinfo/StorageDashboardFragment.java b/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
index 341c76f..4fa698a 100644
--- a/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
+++ b/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
@@ -58,7 +58,8 @@
 import java.util.List;
 
 public class StorageDashboardFragment extends DashboardFragment
-    implements LoaderManager.LoaderCallbacks<SparseArray<StorageAsyncLoader.AppsStorageResult>> {
+        implements
+        LoaderManager.LoaderCallbacks<SparseArray<StorageAsyncLoader.AppsStorageResult>> {
     private static final String TAG = "StorageDashboardFrag";
     private static final int STORAGE_JOB_ID = 0;
     private static final int ICON_JOB_ID = 1;
@@ -223,7 +224,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     final StorageManager sm = context.getSystemService(StorageManager.class);
                     final UserManagerWrapper userManager =
                             new UserManagerWrapper(context.getSystemService(UserManager.class));
@@ -354,7 +356,8 @@
         }
 
         @Override
-        public void onLoaderReset(Loader<SparseArray<Drawable>> loader) {}
+        public void onLoaderReset(Loader<SparseArray<Drawable>> loader) {
+        }
     }
 
     public final class VolumeSizeCallbacks
@@ -369,7 +372,8 @@
         }
 
         @Override
-        public void onLoaderReset(Loader<PrivateStorageInfo> loader) {}
+        public void onLoaderReset(Loader<PrivateStorageInfo> loader) {
+        }
 
         @Override
         public void onLoadFinished(
diff --git a/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java b/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
index 03b69a5..288e33b 100644
--- a/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
+++ b/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
@@ -198,7 +198,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null /*activity */,
                             null /* fragment */, null /* lifecycle */);
diff --git a/src/com/android/settings/display/AmbientDisplaySettings.java b/src/com/android/settings/display/AmbientDisplaySettings.java
index 3cac078..fec0ef5 100644
--- a/src/com/android/settings/display/AmbientDisplaySettings.java
+++ b/src/com/android/settings/display/AmbientDisplaySettings.java
@@ -101,7 +101,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null,
                             new AmbientDisplayConfiguration(context), null, null);
                 }
diff --git a/src/com/android/settings/dream/DreamSettings.java b/src/com/android/settings/dream/DreamSettings.java
index c3eaa7f..f8eeac3 100644
--- a/src/com/android/settings/dream/DreamSettings.java
+++ b/src/com/android/settings/dream/DreamSettings.java
@@ -137,18 +137,18 @@
 
     public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER
             = new BaseSearchIndexProvider() {
-                @Override
-                public List<SearchIndexableResource> getXmlResourcesToIndex(
-                        Context context, boolean enabled) {
-                    final SearchIndexableResource sir = new SearchIndexableResource(context);
-                    sir.xmlResId = R.xml.dream_fragment_overview;
-                    return Arrays.asList(sir);
-                }
+        @Override
+        public List<SearchIndexableResource> getXmlResourcesToIndex(
+                Context context, boolean enabled) {
+            final SearchIndexableResource sir = new SearchIndexableResource(context);
+            sir.xmlResId = R.xml.dream_fragment_overview;
+            return Arrays.asList(sir);
+        }
 
-                @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
-                    return buildPreferenceControllers(context);
-                }
-            };
+        @Override
+        public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
+            return buildPreferenceControllers(context);
+        }
+    };
 }
 
diff --git a/src/com/android/settings/enterprise/EnterprisePrivacySettings.java b/src/com/android/settings/enterprise/EnterprisePrivacySettings.java
index 0628dbb..cd839de 100644
--- a/src/com/android/settings/enterprise/EnterprisePrivacySettings.java
+++ b/src/com/android/settings/enterprise/EnterprisePrivacySettings.java
@@ -112,7 +112,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, false /* async */);
                 }
diff --git a/src/com/android/settings/fuelgauge/SmartBatterySettings.java b/src/com/android/settings/fuelgauge/SmartBatterySettings.java
index 6aeb8a3..f96842d 100644
--- a/src/com/android/settings/fuelgauge/SmartBatterySettings.java
+++ b/src/com/android/settings/fuelgauge/SmartBatterySettings.java
@@ -99,7 +99,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null, null);
                 }
diff --git a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverSettings.java b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverSettings.java
index 2340675..4d89e3e 100644
--- a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverSettings.java
+++ b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverSettings.java
@@ -18,14 +18,9 @@
 
 import android.content.Context;
 import android.os.Bundle;
-import android.os.PowerManager;
 import android.provider.SearchIndexableResource;
-import android.provider.Settings.Global;
-import android.support.annotation.VisibleForTesting;
-import android.util.Log;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.internal.util.ArrayUtils;
 import com.android.settings.R;
 import com.android.settings.dashboard.DashboardFragment;
 import com.android.settings.search.BaseSearchIndexProvider;
@@ -96,7 +91,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null);
                 }
             };
diff --git a/src/com/android/settings/gestures/AssistGestureSettings.java b/src/com/android/settings/gestures/AssistGestureSettings.java
index 8878f47..a4e8f1f3 100644
--- a/src/com/android/settings/gestures/AssistGestureSettings.java
+++ b/src/com/android/settings/gestures/AssistGestureSettings.java
@@ -75,7 +75,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null /* lifecycle */);
                 }
diff --git a/src/com/android/settings/gestures/DoubleTapPowerSettings.java b/src/com/android/settings/gestures/DoubleTapPowerSettings.java
index 0dca805..3ddc79c 100644
--- a/src/com/android/settings/gestures/DoubleTapPowerSettings.java
+++ b/src/com/android/settings/gestures/DoubleTapPowerSettings.java
@@ -89,7 +89,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null /* lifecycle */);
                 }
             };
diff --git a/src/com/android/settings/gestures/DoubleTapScreenSettings.java b/src/com/android/settings/gestures/DoubleTapScreenSettings.java
index f2148b4..eb11fd0 100644
--- a/src/com/android/settings/gestures/DoubleTapScreenSettings.java
+++ b/src/com/android/settings/gestures/DoubleTapScreenSettings.java
@@ -97,7 +97,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null /* lifecycle */);
                 }
             };
diff --git a/src/com/android/settings/gestures/DoubleTwistGestureSettings.java b/src/com/android/settings/gestures/DoubleTwistGestureSettings.java
index ac9de88..46c9a81 100644
--- a/src/com/android/settings/gestures/DoubleTwistGestureSettings.java
+++ b/src/com/android/settings/gestures/DoubleTwistGestureSettings.java
@@ -88,7 +88,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
                     return buildPreferenceControllers(context, null /* lifecycle */);
                 }
             };
diff --git a/src/com/android/settings/gestures/GestureSettings.java b/src/com/android/settings/gestures/GestureSettings.java
index 4d38b09..ea787c8 100644
--- a/src/com/android/settings/gestures/GestureSettings.java
+++ b/src/com/android/settings/gestures/GestureSettings.java
@@ -100,7 +100,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null,
                             new AmbientDisplayConfiguration(context));
diff --git a/src/com/android/settings/gestures/PickupGestureSettings.java b/src/com/android/settings/gestures/PickupGestureSettings.java
index 1762ba8..fab2e66 100644
--- a/src/com/android/settings/gestures/PickupGestureSettings.java
+++ b/src/com/android/settings/gestures/PickupGestureSettings.java
@@ -96,7 +96,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null /* lifecycle */);
                 }
             };
diff --git a/src/com/android/settings/gestures/SwipeToNotificationSettings.java b/src/com/android/settings/gestures/SwipeToNotificationSettings.java
index c6f346a..69fd019 100644
--- a/src/com/android/settings/gestures/SwipeToNotificationSettings.java
+++ b/src/com/android/settings/gestures/SwipeToNotificationSettings.java
@@ -89,7 +89,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null /* lifecycle */);
                 }
             };
diff --git a/src/com/android/settings/language/LanguageAndInputSettings.java b/src/com/android/settings/language/LanguageAndInputSettings.java
index cb60ef5..75d204d 100644
--- a/src/com/android/settings/language/LanguageAndInputSettings.java
+++ b/src/com/android/settings/language/LanguageAndInputSettings.java
@@ -21,7 +21,6 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.pm.PackageManager;
-import android.os.Bundle;
 import android.provider.SearchIndexableResource;
 import android.provider.Settings;
 import android.speech.tts.TtsEngines;
@@ -188,7 +187,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null);
                 }
diff --git a/src/com/android/settings/location/LocationSettings.java b/src/com/android/settings/location/LocationSettings.java
index 3e9c8af..56c4b18 100644
--- a/src/com/android/settings/location/LocationSettings.java
+++ b/src/com/android/settings/location/LocationSettings.java
@@ -178,7 +178,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context
+                public List<AbstractPreferenceController> createPreferenceControllers(Context
                         context) {
                     return buildPreferenceControllers(context, null /* fragment */,
                             null /* lifecycle */);
diff --git a/src/com/android/settings/location/ScanningSettings.java b/src/com/android/settings/location/ScanningSettings.java
index 4585870..1af6e2b 100644
--- a/src/com/android/settings/location/ScanningSettings.java
+++ b/src/com/android/settings/location/ScanningSettings.java
@@ -77,7 +77,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context
+                public List<AbstractPreferenceController> createPreferenceControllers(Context
                         context) {
                     return buildPreferenceControllers(context);
                 }
diff --git a/src/com/android/settings/network/NetworkDashboardFragment.java b/src/com/android/settings/network/NetworkDashboardFragment.java
index 74c1910..822699a 100644
--- a/src/com/android/settings/network/NetworkDashboardFragment.java
+++ b/src/com/android/settings/network/NetworkDashboardFragment.java
@@ -230,7 +230,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context
+                public List<AbstractPreferenceController> createPreferenceControllers(Context
                         context) {
                     return buildPreferenceControllers(context, null /* lifecycle */,
                             null /* metricsFeatureProvider */, null /* fragment */,
diff --git a/src/com/android/settings/notification/ConfigureNotificationSettings.java b/src/com/android/settings/notification/ConfigureNotificationSettings.java
index a3af471..b5c7555 100644
--- a/src/com/android/settings/notification/ConfigureNotificationSettings.java
+++ b/src/com/android/settings/notification/ConfigureNotificationSettings.java
@@ -165,7 +165,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null, null, null);
                 }
diff --git a/src/com/android/settings/notification/SoundSettings.java b/src/com/android/settings/notification/SoundSettings.java
index 032a5cb..581907b 100644
--- a/src/com/android/settings/notification/SoundSettings.java
+++ b/src/com/android/settings/notification/SoundSettings.java
@@ -255,7 +255,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null /* fragment */,
                             null /* callback */, null /* lifecycle */);
                 }
diff --git a/src/com/android/settings/notification/ZenModeAutomationSettings.java b/src/com/android/settings/notification/ZenModeAutomationSettings.java
index 6ce13c1..969c8ef 100644
--- a/src/com/android/settings/notification/ZenModeAutomationSettings.java
+++ b/src/com/android/settings/notification/ZenModeAutomationSettings.java
@@ -98,7 +98,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null, null, null);
                 }
diff --git a/src/com/android/settings/notification/ZenModeBehaviorSettings.java b/src/com/android/settings/notification/ZenModeBehaviorSettings.java
index e2e85f3..1733469 100644
--- a/src/com/android/settings/notification/ZenModeBehaviorSettings.java
+++ b/src/com/android/settings/notification/ZenModeBehaviorSettings.java
@@ -97,7 +97,7 @@
                 }
 
             @Override
-            public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+            public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
                 return buildPreferenceControllers(context, null);
             }
         };
diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java
index 2b48301..12e8d7e 100644
--- a/src/com/android/settings/notification/ZenModeSettings.java
+++ b/src/com/android/settings/notification/ZenModeSettings.java
@@ -230,7 +230,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context
+                public List<AbstractPreferenceController> createPreferenceControllers(Context
                         context) {
                     return buildPreferenceControllers(context, null, null);
                 }
diff --git a/src/com/android/settings/search/BaseSearchIndexProvider.java b/src/com/android/settings/search/BaseSearchIndexProvider.java
index d7577b5..a2953b8 100644
--- a/src/com/android/settings/search/BaseSearchIndexProvider.java
+++ b/src/com/android/settings/search/BaseSearchIndexProvider.java
@@ -67,7 +67,7 @@
             // Entire page should be suppressed, mark all keys from this page as non-indexable.
             return getNonIndexableKeysFromXml(context);
         }
-        final List<AbstractPreferenceController> controllers = getAllPreferenceControllers(context);
+        final List<AbstractPreferenceController> controllers = getPreferenceControllers(context);
         if (controllers != null && !controllers.isEmpty()) {
             final List<String> nonIndexableKeys = new ArrayList<>();
             for (AbstractPreferenceController controller : controllers) {
@@ -89,9 +89,9 @@
     }
 
     @Override
-    public List<AbstractPreferenceController> getAllPreferenceControllers(Context context) {
+    public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
         final List<AbstractPreferenceController> controllersFromCode =
-                getPreferenceControllers(context);
+                createPreferenceControllers(context);
         final List<SearchIndexableResource> res = getXmlResourcesToIndex(context, true);
         if (res == null || res.isEmpty()) {
             return controllersFromCode;
@@ -111,7 +111,12 @@
         return allControllers;
     }
 
-    public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+    /**
+     * Creates a list of {@link AbstractPreferenceController} programatically.
+     * <p/>
+     * This list should create controllers that are not defined in xml as a Slice controller.
+     */
+    public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
         return null;
     }
 
diff --git a/src/com/android/settings/search/DatabaseIndexingUtils.java b/src/com/android/settings/search/DatabaseIndexingUtils.java
index addc807..eaf69b7 100644
--- a/src/com/android/settings/search/DatabaseIndexingUtils.java
+++ b/src/com/android/settings/search/DatabaseIndexingUtils.java
@@ -96,7 +96,7 @@
         final Indexable.SearchIndexProvider provider = getSearchIndexProvider(clazz);
 
         final List<AbstractPreferenceController> controllers =
-                provider.getAllPreferenceControllers(context);
+                provider.getPreferenceControllers(context);
 
         if (controllers == null) {
             return map;
diff --git a/src/com/android/settings/search/Indexable.java b/src/com/android/settings/search/Indexable.java
index 3b2017d..e157fac 100644
--- a/src/com/android/settings/search/Indexable.java
+++ b/src/com/android/settings/search/Indexable.java
@@ -31,7 +31,6 @@
  * {@link Indexable.SearchIndexProvider} interface.
  *
  * See {@link android.provider.SearchIndexableResource} and {@link SearchIndexableRaw}.
- *
  */
 public interface Indexable {
 
@@ -41,12 +40,11 @@
          *
          * See {@link android.provider.SearchIndexableResource}
          *
-         *
          * @param context the context.
          * @param enabled hint telling if the data needs to be considered into the search results
          *                or not.
          * @return a list of {@link android.provider.SearchIndexableResource} references.
-         *         Can be null.
+         * Can be null.
          */
         List<SearchIndexableResource> getXmlResourcesToIndex(Context context, boolean enabled);
 
@@ -69,12 +67,9 @@
         List<String> getNonIndexableKeys(Context context);
 
         /**
-         * @param context
          * @return a list of {@link AbstractPreferenceController} for ResultPayload data during
          * Indexing.
-         *
-         * TODO(zhfan): name is confusing(too similar to getPreferenceControllers). Rename both.
          */
-        List<AbstractPreferenceController> getAllPreferenceControllers(Context context);
+        List<AbstractPreferenceController> getPreferenceControllers(Context context);
     }
 }
diff --git a/src/com/android/settings/security/EncryptionAndCredential.java b/src/com/android/settings/security/EncryptionAndCredential.java
index 627cf3e..a684ee7 100644
--- a/src/com/android/settings/security/EncryptionAndCredential.java
+++ b/src/com/android/settings/security/EncryptionAndCredential.java
@@ -101,7 +101,7 @@
         }
 
         @Override
-        public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+        public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
             return buildPreferenceControllers(context, null /* lifecycle */);
         }
 
diff --git a/src/com/android/settings/security/LockscreenDashboardFragment.java b/src/com/android/settings/security/LockscreenDashboardFragment.java
index c400645..65be6e0 100644
--- a/src/com/android/settings/security/LockscreenDashboardFragment.java
+++ b/src/com/android/settings/security/LockscreenDashboardFragment.java
@@ -114,7 +114,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     final List<AbstractPreferenceController> controllers = new ArrayList<>();
                     controllers.add(new LockScreenNotificationPreferenceController(context));
diff --git a/src/com/android/settings/security/SecuritySettings.java b/src/com/android/settings/security/SecuritySettings.java
index 313b483..2af2f04 100644
--- a/src/com/android/settings/security/SecuritySettings.java
+++ b/src/com/android/settings/security/SecuritySettings.java
@@ -164,7 +164,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context
+                public List<AbstractPreferenceController> createPreferenceControllers(Context
                         context) {
                     return buildPreferenceControllers(context, null /* lifecycle */,
                             null /* host*/);
diff --git a/src/com/android/settings/security/screenlock/ScreenLockSettings.java b/src/com/android/settings/security/screenlock/ScreenLockSettings.java
index 7a01aa2..cc17fa3 100644
--- a/src/com/android/settings/security/screenlock/ScreenLockSettings.java
+++ b/src/com/android/settings/security/screenlock/ScreenLockSettings.java
@@ -99,7 +99,7 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(
+                public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
                     return buildPreferenceControllers(context, null /* parent */,
                             null /* lifecycle */, new LockPatternUtils(context));
diff --git a/src/com/android/settings/system/ResetDashboardFragment.java b/src/com/android/settings/system/ResetDashboardFragment.java
index b7b6b77..cc67e25 100644
--- a/src/com/android/settings/system/ResetDashboardFragment.java
+++ b/src/com/android/settings/system/ResetDashboardFragment.java
@@ -79,7 +79,8 @@
                 }
 
                 @Override
-                public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+                public List<AbstractPreferenceController> createPreferenceControllers(
+                        Context context) {
                     return buildPreferenceControllers(context, null /* lifecycle */);
                 }
             };
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardFragmentSearchIndexProviderInspector.java b/tests/robotests/src/com/android/settings/dashboard/DashboardFragmentSearchIndexProviderInspector.java
index e5db16e..3d9783d 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardFragmentSearchIndexProviderInspector.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardFragmentSearchIndexProviderInspector.java
@@ -50,7 +50,7 @@
         final List<AbstractPreferenceController> controllersFromSearchIndexProvider;
         final List<AbstractPreferenceController> controllersFromFragment;
         try {
-            controllersFromSearchIndexProvider = provider.getAllPreferenceControllers(context);
+            controllersFromSearchIndexProvider = provider.getPreferenceControllers(context);
         } catch (Throwable e) {
             // Can't do much with exception, assume the test passed.
             return true;
diff --git a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacySettingsTest.java b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacySettingsTest.java
index b46be8c..b38b0f0 100644
--- a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacySettingsTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacySettingsTest.java
@@ -98,7 +98,7 @@
     @Test
     public void getSearchIndexProviderPreferenceControllers() throws Exception {
         final List<AbstractPreferenceController> controllers
-                = EnterprisePrivacySettings.SEARCH_INDEX_DATA_PROVIDER.getAllPreferenceControllers(
+                = EnterprisePrivacySettings.SEARCH_INDEX_DATA_PROVIDER.getPreferenceControllers(
                 ShadowApplication.getInstance().getApplicationContext());
         verifyPreferenceControllers(controllers);
     }
diff --git a/tests/robotests/src/com/android/settings/search/BaseSearchIndexProviderTest.java b/tests/robotests/src/com/android/settings/search/BaseSearchIndexProviderTest.java
index 798149a..f5d3793 100644
--- a/tests/robotests/src/com/android/settings/search/BaseSearchIndexProviderTest.java
+++ b/tests/robotests/src/com/android/settings/search/BaseSearchIndexProviderTest.java
@@ -85,7 +85,7 @@
     public void getNonIndexableKeys_preferenceIsAvailable_shouldReturnEmptyList() {
         List<AbstractPreferenceController> controllers = new ArrayList<>();
         controllers.add(new AvailablePreferenceController(mContext));
-        doReturn(controllers).when(mIndexProvider).getPreferenceControllers(mContext);
+        doReturn(controllers).when(mIndexProvider).createPreferenceControllers(mContext);
 
         assertThat(mIndexProvider.getNonIndexableKeys(mContext)).isEqualTo(Collections.EMPTY_LIST);
     }
@@ -104,7 +104,7 @@
             }
 
             @Override
-            public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
+            public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
                 final List<AbstractPreferenceController> controllersFromCode = new ArrayList<>();
                 controllersFromCode.add(new BasePreferenceController(mContext, "TEST_KEY") {
                     @Override
@@ -117,7 +117,7 @@
         };
 
         final List<AbstractPreferenceController> controllers =
-                provider.getAllPreferenceControllers(mContext);
+                provider.getPreferenceControllers(mContext);
 
         assertThat(controllers).hasSize(3);
     }
@@ -143,7 +143,7 @@
     public void getNonIndexableKeys_preferenceIsNotAvailable_shouldReturnKey() {
         List<AbstractPreferenceController> controllers = new ArrayList<>();
         controllers.add(new NotAvailablePreferenceController(mContext));
-        doReturn(controllers).when(mIndexProvider).getPreferenceControllers(mContext);
+        doReturn(controllers).when(mIndexProvider).createPreferenceControllers(mContext);
 
         assertThat(mIndexProvider.getNonIndexableKeys(mContext)).contains(TEST_PREF_KEY);
     }
diff --git a/tests/robotests/src/com/android/settings/search/indexing/FakeSettingsFragment.java b/tests/robotests/src/com/android/settings/search/indexing/FakeSettingsFragment.java
index e857ae4..ef4bf99 100644
--- a/tests/robotests/src/com/android/settings/search/indexing/FakeSettingsFragment.java
+++ b/tests/robotests/src/com/android/settings/search/indexing/FakeSettingsFragment.java
@@ -116,11 +116,5 @@
                     keys.add("pref_key_3");
                     return keys;
                 }
-
-                @Override
-                public List<AbstractPreferenceController>
-                getPreferenceControllers(Context context) {
-                    return null;
-                }
             };
 }
\ No newline at end of file
diff --git a/tests/unit/src/com/android/settings/core/PreferenceControllerContractTest.java b/tests/unit/src/com/android/settings/core/PreferenceControllerContractTest.java
index 7e26f11..802a3a7 100644
--- a/tests/unit/src/com/android/settings/core/PreferenceControllerContractTest.java
+++ b/tests/unit/src/com/android/settings/core/PreferenceControllerContractTest.java
@@ -20,7 +20,6 @@
 
 import android.content.Context;
 import android.platform.test.annotations.Presubmit;
-import android.provider.SearchIndexableResource;
 import android.support.test.InstrumentationRegistry;
 import android.support.test.filters.MediumTest;
 import android.support.test.runner.AndroidJUnit4;
@@ -67,7 +66,7 @@
             }
 
             final List<AbstractPreferenceController> controllers =
-                    provider.getAllPreferenceControllers(mContext);
+                    provider.getPreferenceControllers(mContext);
             if (controllers == null) {
                 continue;
             }