summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-11-24 16:13:54 -0500
committerJoe Onorato <joeo@android.com>2009-11-24 16:13:54 -0500
commitb20612133bcba1c89a52da21b4867a69fd49ef09 (patch)
treea7ce1b94dc9188c8c2dfce88a57a261c85f5db4e /src
parent09cf7d19db69dc4ac0f3457590e8df539bfec7d1 (diff)
downloadandroid_packages_apps_Trebuchet-b20612133bcba1c89a52da21b4867a69fd49ef09.tar.gz
android_packages_apps_Trebuchet-b20612133bcba1c89a52da21b4867a69fd49ef09.tar.bz2
android_packages_apps_Trebuchet-b20612133bcba1c89a52da21b4867a69fd49ef09.zip
Fix bug 2248173 - all apps animates out when you return home.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/Launcher.java35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 3768966d6..0e1ae7d7b 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -813,7 +813,6 @@ public final class Launcher extends Activity
}
void closeSystemDialogs() {
- closeAllApps(true);
getWindow().closeAllPanels();
try {
@@ -1841,6 +1840,28 @@ public final class Launcher extends Activity
//mHandleView.setVisibility(View.GONE);
}
+ /**
+ * Things to test when changing this code:
+ * - Home from workspace
+ * - from center screen
+ * - from other screens
+ * - Home from all apps
+ * - Back from all apps
+ * - Launch app from workspace and quit
+ * - with back
+ * - with home
+ * - Launch app from all apps and quit
+ * - with back
+ * - with home
+ * - On workspace, long press power and go back
+ * - with back
+ * - with home
+ * - On all apps, long press power and go back
+ * - with back
+ * - with home
+ * - On workspace, power off
+ * - On all apps, power off
+ */
void closeAllApps(boolean animated) {
if (mAllAppsGrid.isVisible()) {
mAllAppsGrid.zoom(0.0f, animated);
@@ -1992,6 +2013,18 @@ public final class Launcher extends Activity
@Override
public void onReceive(Context context, Intent intent) {
closeSystemDialogs();
+ String reason = intent.getStringExtra("reason");
+ if (!"homekey".equals(reason)) {
+ boolean animate = true;
+ /*
+ if ("globalactions".equals(reason)) {
+ // For some reason (probably the fading), this animation is
+ // choppy, so don't show it.
+ animate = false;
+ }
+ */
+ closeAllApps(animate);
+ }
}
}