Improve search indexing time.

- Some import clean up.
- Add timing log to track indexing time breakdown.
- Remove isAvailable() from UserDictionaryPreferenceController.

Bug: 36391685
Test: rebuild
Change-Id: If154c5dafba5d21cb1020497c44fbf67f03ad820
This commit is contained in:
Fan Zhang
2017-07-17 11:08:09 -07:00
parent 4b351b4ca1
commit 465d79776f
11 changed files with 140 additions and 99 deletions

View File

@@ -19,6 +19,8 @@ package com.android.settings.search;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.android.settings.applications.PackageManagerWrapperImpl;
import com.android.settings.dashboard.SiteMapManager;
import com.android.settings.overlay.FeatureFactory;
@@ -80,6 +82,9 @@ public class SearchFeatureProviderImpl implements SearchFeatureProvider {
@Override
public void updateIndexAsync(Context context, IndexingCallback callback) {
if (SettingsSearchIndexablesProvider.DEBUG) {
Log.d(TAG, "updating index async");
}
getIndexingManager(context).indexDatabase(callback);
}