diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-08-30 17:12:35 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-30 17:12:35 -0700 |
commit | 11ffa5ffb367bb4f62607d1cf5616909cf7d8b02 (patch) | |
tree | 879a67fe876e11eca98d06a780134cec2c6edff4 /src | |
parent | de3fbbc832eaccf08c34fbd233f77fc9d4f77d1a (diff) | |
parent | bb003a540bb4599e020b36c2680e0f0f520b32d6 (diff) | |
download | packages_apps_trebuchet-11ffa5ffb367bb4f62607d1cf5616909cf7d8b02.zip packages_apps_trebuchet-11ffa5ffb367bb4f62607d1cf5616909cf7d8b02.tar.gz packages_apps_trebuchet-11ffa5ffb367bb4f62607d1cf5616909cf7d8b02.tar.bz2 |
Merge "Fix issue #5209847: Make launcher turn off the wallpaper in all apps."
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index f05850b..a6c1de6 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -76,6 +76,7 @@ import android.view.MotionEvent; import android.view.Surface; import android.view.View; import android.view.ViewGroup; +import android.view.WindowManager; import android.view.View.OnLongClickListener; import android.view.accessibility.AccessibilityEvent; import android.view.animation.DecelerateInterpolator; @@ -2071,6 +2072,15 @@ public final class Launcher extends Activity } } + void updateWallpaperVisibility(boolean visible) { + int wpflags = visible ? WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER : 0; + int curflags = getWindow().getAttributes().flags + & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; + if (wpflags != curflags) { + getWindow().setFlags(wpflags, WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER); + } + } + /** * Zoom the camera out from the workspace to reveal 'toView'. * Assumes that the view to show is anchored at either the very top or very bottom @@ -2120,6 +2130,7 @@ public final class Launcher extends Activity scaleAnim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { + updateWallpaperVisibility(true); // Prepare the position toView.setTranslationX(0.0f); toView.setTranslationY(0.0f); @@ -2142,6 +2153,7 @@ public final class Launcher extends Activity mWorkspace.hideScrollingIndicator(true); mWorkspace.hideDockDivider(true); } + updateWallpaperVisibility(false); } }); @@ -2169,6 +2181,7 @@ public final class Launcher extends Activity mWorkspace.hideDockDivider(true); } } + updateWallpaperVisibility(false); } } @@ -2188,6 +2201,8 @@ public final class Launcher extends Activity setPivotsForZoom(fromView, fromState, scaleFactor); + updateWallpaperVisibility(true); + if (!springLoaded) { mWorkspace.unshrink(animated); } @@ -2230,6 +2245,7 @@ public final class Launcher extends Activity } @Override public void onAnimationEnd(Animator animation) { + updateWallpaperVisibility(true); fromView.setVisibility(View.GONE); if (fromView instanceof LauncherTransitionable) { ((LauncherTransitionable) fromView).onLauncherTransitionEnd(alphaAnim,true); |