diff options
author | cretin45 <cretin45@gmail.com> | 2016-01-13 14:20:31 -0800 |
---|---|---|
committer | Tom Powell <zifnab@zifnab06.net> | 2017-03-26 16:14:44 -0700 |
commit | 6987542672e89726d512dee5186e60354f29d932 (patch) | |
tree | c22eac85f3faa6c8ab9fc6e088442fcaccdeb915 /src/com/android/launcher3/LauncherModel.java | |
parent | 7990b17ce96afb8c14229389fa6f0dd67c5b1eab (diff) | |
download | android_packages_apps_Trebuchet-6987542672e89726d512dee5186e60354f29d932.tar.gz android_packages_apps_Trebuchet-6987542672e89726d512dee5186e60354f29d932.tar.bz2 android_packages_apps_Trebuchet-6987542672e89726d512dee5186e60354f29d932.zip |
Trebuchet: Fix some monkey test race condition bugs
Issue-id: CYNGNOS-1587
Change-Id: I45ead8cfbd7fab3a9ae62f878a160a696c411e75
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 7a12eb8ef..36d4877fb 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -654,27 +654,27 @@ public class LauncherModel extends BroadcastReceiver modelShortcut.spanX == shortcut.spanX && modelShortcut.spanY == shortcut.spanY && ((modelShortcut.dropPos == null && shortcut.dropPos == null) || - (modelShortcut.dropPos != null && - shortcut.dropPos != null && - modelShortcut.dropPos[0] == shortcut.dropPos[0] && - modelShortcut.dropPos[1] == shortcut.dropPos[1]))) { + (modelShortcut.dropPos != null && + shortcut.dropPos != null && + modelShortcut.dropPos[0] == shortcut.dropPos[0] && + modelShortcut.dropPos[1] == shortcut.dropPos[1]))) { // For all intents and purposes, this is the same object return; } - } - // the modelItem needs to match up perfectly with item if our model is - // to be consistent with the database-- for now, just require - // modelItem == item or the equality check above - String msg = "item: " + ((item != null) ? item.toString() : "null") + - "modelItem: " + - ((modelItem != null) ? modelItem.toString() : "null") + - "Error: ItemInfo passed to checkItemInfo doesn't match original"; - RuntimeException e = new RuntimeException(msg); - if (stackTrace != null) { - e.setStackTrace(stackTrace); + // the modelItem needs to match up perfectly with item if our model is + // to be consistent with the database-- for now, just require + // modelItem == item or the equality check above + String msg = "item: " + ((item != null) ? item.toString() : "null") + + "modelItem: " + + ((modelItem != null) ? modelItem.toString() : "null") + + "Error: ItemInfo passed to checkItemInfo doesn't match original"; + RuntimeException e = new RuntimeException(msg); + if (stackTrace != null) { + e.setStackTrace(stackTrace); + } + throw e; } - throw e; } } |