diff options
author | Winson Chung <winsonc@google.com> | 2012-05-06 16:06:47 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-06 16:06:47 -0700 |
commit | 4a8938fd16740bf7833b446abe05d0d994f166e2 (patch) | |
tree | 9db9efe522333da8509cbab9d6624224afeb68d7 | |
parent | 8a0bff5e35f63321178bbf777ec24d42544866b3 (diff) | |
parent | 31ce073f6a4a6e3e71d533ea4a2a423c2509ad89 (diff) | |
download | android_packages_apps_Trebuchet-4a8938fd16740bf7833b446abe05d0d994f166e2.tar.gz android_packages_apps_Trebuchet-4a8938fd16740bf7833b446abe05d0d994f166e2.tar.bz2 android_packages_apps_Trebuchet-4a8938fd16740bf7833b446abe05d0d994f166e2.zip |
Merge "Keying off the Launcher state to determine wallpaper visibility (Bug 6396752)" into jb-dev
-rw-r--r-- | src/com/android/launcher2/AppsCustomizeTabHost.java | 11 | ||||
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 17 |
2 files changed, 17 insertions, 11 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/Launcher.java b/src/com/android/launcher2/Launcher.java index 0d4b0d041..ff8e78594 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -1180,6 +1180,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; } |