Wrap old search index update logic behind FeatureProvider.

Change-Id: I31024d2e7900a90b4f7dc8cc81951bf6a0e533fa
Fix: 34123028
Test: RunSettingsRoboTests
This commit is contained in:
Fan Zhang
2017-01-06 09:18:59 -08:00
parent a8205bb528
commit a875924100
2 changed files with 7 additions and 6 deletions

View File

@@ -462,10 +462,7 @@ public class SettingsActivity extends SettingsDrawerActivity
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!");
}