Removing all usage of LauncherProvider

Also fixing a race condition in model when an item update/delete task
gets queued and executed after the model has reloaded (making the old
data obsolete)

Bug: 277345535
Bug: 263079498
Test: Presubmit
Flag: N/A
Change-Id: Ibd4bdbb3eece05b38b73a22a4be5f368df3754f0
This commit is contained in:
Sunny Goyal committed 2023-06-07 12:57:13 -07:00
1 parent 859d0d87e2
commit 7b9e28f152
26 files changed
+326 -518

No files matched your search

+2 -3
View File
@@ -897,9 +897,8 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
mWorkspaceScreens.remove(emptyScreenId);
mScreenOrder.removeValue(emptyScreenId);
int newScreenId = LauncherSettings.Settings.call(getContext().getContentResolver(),
LauncherSettings.Settings.METHOD_NEW_SCREEN_ID)
.getInt(LauncherSettings.Settings.EXTRA_VALUE);
int newScreenId = LauncherAppState.getInstance(getContext())
.getModel().getModelDbController().getNewScreenId();
// Launcher database isn't aware of empty pages that are already bound, so we need to
// skip those IDs manually.
while (mWorkspaceScreens.containsKey(newScreenId)) {