Skip to content

Commit 2ec541f

Browse files
author
Craig Mautner
committed
Do not hide animating window behind keyguard.
The transition from clock to keyguard when restarting the device was janky. The cause was that the clock app was animating away which kept the adjustWallpaperWindowsLocked() method from setting the keyguard as the new mWallpaperTarget. At the same time the WindowAnimator saw that the keyguard was readyToDisplay() which set mForceHiding true causing the clock to become hidden. Since the clock was mWallpaperTarget the wallpaper was hidden at the same time. This fix does not allow mForceHiding to hide an animating window. Fixes bug 6649988. Change-Id: Ie5cb0dfcc987d5ee1ad2351cf520629b8e301a2b
1 parent f958732 commit 2ec541f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

services/java/com/android/server/wm/WindowAnimator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ private void updateWindowsAndWallpaperLocked() {
292292
+ " anim=" + win.mWinAnimator.mAnimation);
293293
} else if (mPolicy.canBeForceHidden(win, win.mAttrs)) {
294294
final boolean changed;
295-
if (mForceHiding) {
295+
if (mForceHiding && !winAnimator.isAnimating()) {
296296
changed = win.hideLw(false, false);
297297
if (WindowManagerService.DEBUG_VISIBILITY && changed) Slog.v(TAG,
298298
"Now policy hidden: " + win);

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,8 +1740,6 @@ int adjustWallpaperWindowsLocked() {
17401740
mWallpaperTarget = oldW;
17411741
foundW = oldW;
17421742
foundI = oldI;
1743-
mLowerWallpaperTarget = null;
1744-
mUpperWallpaperTarget = null;
17451743
}
17461744
// Now set the upper and lower wallpaper targets
17471745
// correctly, and make sure that we are positioning
@@ -3162,6 +3160,7 @@ private Animation createScaleUpAnimationLocked(int transit, boolean enter) {
31623160
set.addAnimation(scale);
31633161
alpha.setDuration(duration);
31643162
set.addAnimation(alpha);
3163+
set.setDetachWallpaper(true);
31653164
a = set;
31663165
} else {
31673166
a = createExitAnimationLocked(transit, duration);

0 commit comments

Comments
 (0)