Merge branch 'eclair' into eclair-release
diff --git a/src/com/android/launcher2/AllAppsList.java b/src/com/android/launcher2/AllAppsList.java
index 4d3ee77..561b345 100644
--- a/src/com/android/launcher2/AllAppsList.java
+++ b/src/com/android/launcher2/AllAppsList.java
@@ -152,7 +152,7 @@
data.add(applicationInfo);
added.add(applicationInfo);
} else {
- AppInfoCache.update(info, applicationInfo, context);
+ AppInfoCache.update(info, applicationInfo, context, bubble);
modified.add(applicationInfo);
}
}
diff --git a/src/com/android/launcher2/AppInfoCache.java b/src/com/android/launcher2/AppInfoCache.java
index 2fdfc28..a2d9830 100644
--- a/src/com/android/launcher2/AppInfoCache.java
+++ b/src/com/android/launcher2/AppInfoCache.java
@@ -86,9 +86,10 @@
/**
* Update the entry in the in the cache with its new metadata.
*/
- public static void update(ResolveInfo info, ApplicationInfo applicationInfo, Context context) {
+ public static void update(ResolveInfo info, ApplicationInfo applicationInfo, Context context,
+ Utilities.BubbleText bubble) {
synchronized (sCache) {
- updateTitleAndIcon(info, applicationInfo, context, new Utilities.BubbleText(context));
+ updateTitleAndIcon(info, applicationInfo, context, bubble);
ComponentName componentName = new ComponentName(
info.activityInfo.applicationInfo.packageName, info.activityInfo.name);
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 3768966..d2fd6a9 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -813,7 +813,6 @@
}
void closeSystemDialogs() {
- closeAllApps(true);
getWindow().closeAllPanels();
try {
@@ -1841,6 +1840,28 @@
//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 @@
@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);
+ }
}
}
@@ -2189,6 +2222,7 @@
public void bindPackageUpdated(String packageName, ArrayList<ApplicationInfo> apps) {
removeDialog(DIALOG_CREATE_SHORTCUT);
mWorkspace.updateShortcutsForPackage(packageName);
+ mAllAppsGrid.updateApps(packageName, apps);
}
/**