Wrap old search index update logic behind FeatureProvider.
Change-Id: I31024d2e7900a90b4f7dc8cc81951bf6a0e533fa
Fix: 34123028
Test: RunSettingsRoboTests
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 179e352..d5920e5 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -462,10 +462,7 @@
if (mIsShowingDashboard) {
// Run the Index update only if we have some space
if (!Utils.isLowStorage(this)) {
- long indexStartTime = System.currentTimeMillis();
- Index.getInstance(getApplicationContext()).update();
- if (DEBUG_TIMING) Log.d(LOG_TAG, "Index.update() took "
- + (System.currentTimeMillis() - indexStartTime) + " ms");
+ mSearchFeatureProvider.updateIndex(getApplicationContext());
} else {
Log.w(LOG_TAG, "Cannot update the Indexer as we are running low on storage space!");
}