summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher2/AppsCustomizeTabHost.java11
-rw-r--r--src/com/android/launcher2/CellLayout.java5
-rw-r--r--src/com/android/launcher2/Launcher.java17
-rw-r--r--src/com/android/launcher2/LauncherModel.java2
-rw-r--r--src/com/android/launcher2/Workspace.java2
5 files changed, 23 insertions, 14 deletions
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 7a2c247c6..d3afc3bf0 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -471,17 +471,6 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
// Load the current page synchronously, and the neighboring pages asynchronously
mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage(), true);
mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage());
-
- // We had to enable the wallpaper visibility when launching apps from all apps (so that
- // the transitions would be the same as when launching from workspace) so we need to
- // re-disable the wallpaper visibility to ensure performance.
- int duration = getResources().getInteger(android.R.integer.config_shortAnimTime);
- postDelayed(new Runnable() {
- @Override
- public void run() {
- mLauncher.updateWallpaperVisibility(false);
- }
- }, duration);
}
}
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 6f4759d1e..ba20a76ba 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -160,6 +160,9 @@ public class CellLayout extends ViewGroup {
private static final int INVALID_DIRECTION = -100;
private DropTarget.DragEnforcer mDragEnforcer;
+ private final static PorterDuffXfermode sAddBlendMode =
+ new PorterDuffXfermode(PorterDuff.Mode.ADD);
+
public CellLayout(Context context) {
this(context, null);
}
@@ -506,7 +509,7 @@ public class CellLayout extends ViewGroup {
if (mForegroundAlpha > 0) {
mOverScrollForegroundDrawable.setBounds(mForegroundRect);
Paint p = ((NinePatchDrawable) mOverScrollForegroundDrawable).getPaint();
- p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
+ p.setXfermode(sAddBlendMode);
mOverScrollForegroundDrawable.draw(canvas);
p.setXfermode(null);
}
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index ce855a121..8b6fee92d 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1182,6 +1182,23 @@ public final class Launcher extends Activity
// currently shown, because doing that may involve
// some communication back with the app.
mWorkspace.postDelayed(mBuildLayersRunnable, 500);
+
+ // We had to enable the wallpaper visibility when launching apps from all
+ // apps (so that the transitions would be the same as when launching from
+ // workspace) so take this time to see if we need to re-disable the
+ // wallpaper visibility to ensure performance.
+ mWorkspace.post(new Runnable() {
+ @Override
+ public void run() {
+ if (mState == State.APPS_CUSTOMIZE) {
+ if (mAppsCustomizeTabHost != null &&
+ !mAppsCustomizeTabHost.isTransitioning()) {
+ updateWallpaperVisibility(false);
+ }
+ }
+ }
+ });
+
observer.removeOnPreDrawListener(this);
return true;
}
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index ff4abc6b3..bae4c56fc 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -1684,7 +1684,7 @@ public class LauncherModel extends BroadcastReceiver {
for (ItemInfo i : sWorkspaceItems) {
if (i instanceof ShortcutInfo) {
ShortcutInfo info = (ShortcutInfo) i;
- if (info.intent.getPackage().equals(packageName)) {
+ if (info.intent.getComponent().getPackageName().equals(packageName)) {
infos.add(info);
}
}
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index e946095f7..456224f65 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -3708,7 +3708,7 @@ public class Workspace extends SmoothPagedView
for (String intentStr : newApps) {
try {
Intent intent = Intent.parseUri(intentStr, 0);
- if (packageNames.contains(intent.getPackage())) {
+ if (packageNames.contains(intent.getComponent().getPackageName())) {
newApps.remove(intentStr);
}
} catch (URISyntaxException e) {}