From 7e4ed99eb075ebe3a7a10b852ae791bee5000e6e Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Thu, 3 Dec 2009 13:10:49 -0800 Subject: [PATCH] Fix 2300792 - All apps zooming when you come back from an app. This makes it so we're only listening for the CLOSE_SYSTEM_DIALOGS broadcast while we're between onResume and onPause. --- src/com/android/launcher2/Launcher.java | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 5f6e6f161b..acfccb17a6 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -208,9 +208,6 @@ public final class Launcher extends Activity mDragController = new DragController(this); mInflater = getLayoutInflater(); - IntentFilter filter = new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); - registerReceiver(mCloseSystemDialogsReceiver, filter); - mAppWidgetManager = AppWidgetManager.getInstance(this); mAppWidgetHost = new LauncherAppWidgetHost(this, APPWIDGET_HOST_ID); mAppWidgetHost.startListening(); @@ -404,6 +401,9 @@ public final class Launcher extends Activity protected void onResume() { super.onResume(); + IntentFilter filter = new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); + registerReceiver(mCloseSystemDialogsReceiver, filter); + if (mRestoring) { mWorkspaceLoading = true; mModel.startLoader(this, true); @@ -432,6 +432,7 @@ public final class Launcher extends Activity dismissPreview(mPreviousView); dismissPreview(mNextView); mDragController.cancelDrag(); + unregisterReceiver(mCloseSystemDialogsReceiver); } @Override @@ -934,8 +935,6 @@ public final class Launcher extends Activity dismissPreview(mPreviousView); dismissPreview(mNextView); - - unregisterReceiver(mCloseSystemDialogsReceiver); } @Override @@ -1845,7 +1844,7 @@ public final class Launcher extends Activity } /** - * Things to test when changing this code: + * Things to test when changing this code. * - Home from workspace * - from center screen * - from other screens @@ -1857,6 +1856,10 @@ public final class Launcher extends Activity * - Launch app from all apps and quit * - with back * - with home + * - Go to a screen that's not the default, then all + * apps, and launch and app, and go back + * - with back + * -with home * - On workspace, long press power and go back * - with back * - with home @@ -1865,6 +1868,11 @@ public final class Launcher extends Activity * - with home * - On workspace, power off * - On all apps, power off + * - Launch an app and turn off the screen while in that app + * - Go back with home key + * - Go back with back key + * - From all apps + * - From workspace */ void closeAllApps(boolean animated) { if (mAllAppsGrid.isVisible()) {