fix DatabaseIndexingManagerTest hanging in tests
Test: make RunSettingsRoboTests -j40 Change-Id: I755c04daadcb8804d97f72521d84573d80b4ff19
This commit is contained in:
@@ -293,7 +293,8 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
static void setBuildIndexed(Context context, String buildNo) {
|
||||
context.getSharedPreferences(SHARED_PREFS_TAG, 0).edit().putBoolean(buildNo, true).commit();
|
||||
// Use #apply() instead of #commit() since #commit() Robolectric loop indefinitely in sdk 26
|
||||
context.getSharedPreferences(SHARED_PREFS_TAG, 0).edit().putBoolean(buildNo, true).apply();
|
||||
}
|
||||
|
||||
private void dropTables(SQLiteDatabase db) {
|
||||
|
Reference in New Issue
Block a user