launcher3: Introduce onGridMigrationComplete callback.
onGridMigrationComplete is invoked when grid migration successfully completes. ModelDelegate's can choose to observe this by overriding the callback. Test: manual, existing Flag: com.android.launcher3.one_grid_specs Bug: 386802204 Change-Id: Iaca2e61a95c3d3decc12b2cc54461dba441202a0
This commit is contained in:
+4
-2
@@ -61,9 +61,11 @@ public class FavoriteItemsTransaction {
|
||||
ModelDbController controller = model.getModelDbController();
|
||||
// Migrate any previous data so that the DB state is correct
|
||||
if (Flags.gridMigrationRefactor()) {
|
||||
controller.attemptMigrateDb(null /* restoreEventLogger */);
|
||||
controller.attemptMigrateDb(
|
||||
null /* restoreEventLogger */, model.getModelDelegate());
|
||||
} else {
|
||||
controller.tryMigrateDB(null /* restoreEventLogger */);
|
||||
controller.tryMigrateDB(null /* restoreEventLogger */,
|
||||
model.getModelDelegate());
|
||||
}
|
||||
|
||||
// Create DB again to load fresh data
|
||||
|
||||
Reference in New Issue
Block a user