diff options
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 1e138f772..2fcf86925 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -1486,8 +1486,11 @@ public final class Launcher extends Activity TextKeyListener.getInstance().release(); - - unbindWorkspaceAndHotseatItems(); + // Disconnect any of the callbacks and drawables associated with ItemInfos on the workspace + // to prevent leaking Launcher activities on orientation change. + if (mModel != null) { + mModel.unbindItemInfosAndClearQueuedBindRunnables(); + } getContentResolver().unregisterContentObserver(mWidgetObserver); unregisterReceiver(mCloseSystemDialogsReceiver); @@ -1878,16 +1881,6 @@ public final class Launcher extends Activity } /** - * Go through the and disconnect any of the callbacks in the drawables and the views or we - * leak the previous Home screen on orientation change. - */ - private void unbindWorkspaceAndHotseatItems() { - if (mModel != null) { - mModel.unbindWorkspaceItems(); - } - } - - /** * Launches the intent referred by the clicked shortcut. * * @param v The view representing the clicked shortcut. |