Add synchronous indexing api to SearchFeatureProvider

- Opens the database indexing to be synchronous for the
external settings api.
- Adds logging to track synchronous and async indexing
times.

Bug: 62826872
Test: make RunSettingsRoboTests
Change-Id: I28b69f3952946c0ae5dd7ea7da66f7a5fd485637
This commit is contained in:
Matthew Fritze
2017-06-25 14:18:02 -07:00
parent a6b24388fc
commit 98a9e42c93
6 changed files with 38 additions and 12 deletions

View File

@@ -62,9 +62,15 @@ public interface SearchFeatureProvider {
SiteMapManager getSiteMapManager();
/**
* Updates the Settings indexes
* Updates the Settings indexes and calls {@link IndexingCallback#onIndexingFinished()} on
* {@param callback} when indexing is complete.
*/
void updateIndex(Context context, IndexingCallback callback);
void updateIndexAsync(Context context, IndexingCallback callback);
/**
* Synchronously updates the Settings database.
*/
void updateIndex(Context context);
/**
* @returns true when indexing is complete.