Prevent race conditions after dropping database
Block all loaders from accessing the database before indexing is complete. Bug: 37501479 Test: make RunSettingsRoboTests Change-Id: I2af98dcf6bceacbeffa70bd40879c97bb0cbc828 Merged-In: I02f8423c0ffc27abbb8ceb61a8c47d2f0796d0bb
This commit is contained in:
@@ -21,6 +21,7 @@ import android.view.Menu;
|
||||
|
||||
import android.view.View;
|
||||
import com.android.settings.dashboard.SiteMapManager;
|
||||
import com.android.settings.search.IndexingCallback;
|
||||
|
||||
/**
|
||||
* FeatureProvider for Settings Search
|
||||
@@ -68,7 +69,12 @@ public interface SearchFeatureProvider {
|
||||
/**
|
||||
* Updates the Settings indexes
|
||||
*/
|
||||
void updateIndex(Context context);
|
||||
void updateIndex(Context context, IndexingCallback callback);
|
||||
|
||||
/**
|
||||
* @returns true when indexing is complete.
|
||||
*/
|
||||
boolean isIndexingComplete(Context context);
|
||||
|
||||
/**
|
||||
* Initializes the feedback button in case it was dismissed.
|
||||
|
||||
Reference in New Issue
Block a user