Merge "Keying off the Launcher state to determine wallpaper visibility (Bug 6396752)" into jb-dev

This commit is contained in:
Winson Chung
2012-05-06 16:06:47 -07:00
committed by Android (Google) Code Review
2 changed files with 17 additions and 11 deletions
@@ -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);
}
}
+17
View File
@@ -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;
}