Fixing bug when model was not reflected properly on the UI.
If launcher submits a job, and then reloads before the job is executed, the correct model
is not reflected on the Launcher. In that case, we simply rebind the launcher
Change-Id: I380242a4de13e7b2bc326d1a076f0a974435999c
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 6646b78..04a32f7 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -135,6 +135,8 @@
};
public interface Callbacks {
+ public void rebindModel();
+
public int getCurrentWorkspaceScreen();
public void clearPendingBinds();
public void startBinding();
@@ -196,8 +198,9 @@
enqueueModelUpdateTask(new AddWorkspaceItemsTask(itemList));
}
- public ModelWriter getWriter(boolean hasVerticalHotseat) {
- return new ModelWriter(mApp.getContext(), sBgDataModel, hasVerticalHotseat);
+ public ModelWriter getWriter(boolean hasVerticalHotseat, boolean verifyChanges) {
+ return new ModelWriter(mApp.getContext(), this, sBgDataModel,
+ hasVerticalHotseat, verifyChanges);
}
static void checkItemInfoLocked(