diff options
author | Winson Chung <winsonc@google.com> | 2011-09-02 11:45:39 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-09-02 17:07:46 -0700 |
commit | 603bcb91a091d0f4512fdfb92d6df3c6f9fa8059 (patch) | |
tree | a7953c5834878c79911e423c9cccc17affe8299d /src/com/android/launcher2/Launcher.java | |
parent | 4512637a8a38610282caafe1335a67073dda8224 (diff) | |
download | packages_apps_trebuchet-603bcb91a091d0f4512fdfb92d6df3c6f9fa8059.zip packages_apps_trebuchet-603bcb91a091d0f4512fdfb92d6df3c6f9fa8059.tar.gz packages_apps_trebuchet-603bcb91a091d0f4512fdfb92d6df3c6f9fa8059.tar.bz2 |
Prevent accessing LauncherModel data structures on main thread. (5220358)
Change-Id: Ib9de96abb0ab13ef63b9c594f6982368fd1b614f
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 637d956..8bbf902 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -1602,7 +1602,9 @@ public final class Launcher extends Activity * leak the previous Home screen on orientation change. */ private void unbindWorkspaceAndHotseatItems() { - LauncherModel.unbindWorkspaceItems(); + if (mModel != null) { + mModel.unbindWorkspaceItems(); + } } /** @@ -2754,9 +2756,6 @@ public final class Launcher extends Activity if (mHotseat != null) { mHotseat.resetLayout(); } - - // This wasn't being called before which resulted in a leak of AppWidgetHostViews - unbindWorkspaceAndHotseatItems(); } /** |