summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-03-02 15:16:12 -0800
committerSunny Goyal <sunnygoyal@google.com>2018-03-05 17:38:47 -0800
commit605bcf3367ab85b50ee4897418678416cc8b2f0c (patch)
tree7dbe0c842340ea9550fbf08cb7874591e8af1cf0 /src/com/android/launcher3/LauncherModel.java
parentd912e3f82ad0ddd09c16eb5575fc911b32e9b076 (diff)
downloadpackages_apps_Trebuchet-605bcf3367ab85b50ee4897418678416cc8b2f0c.tar.gz
packages_apps_Trebuchet-605bcf3367ab85b50ee4897418678416cc8b2f0c.tar.bz2
packages_apps_Trebuchet-605bcf3367ab85b50ee4897418678416cc8b2f0c.zip
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
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r--src/com/android/launcher3/LauncherModel.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 6646b78de..04a32f7c9 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -135,6 +135,8 @@ public class LauncherModel extends BroadcastReceiver
};
public interface Callbacks {
+ public void rebindModel();
+
public int getCurrentWorkspaceScreen();
public void clearPendingBinds();
public void startBinding();
@@ -196,8 +198,9 @@ public class LauncherModel extends BroadcastReceiver
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(