Skip to content

Commit 16a61a5

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Revert "Merge errors."" into jb-dev
2 parents 73220fa + c38869a commit 16a61a5

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,15 @@ synchronized void animate() {
496496

497497
final int N = mWinAnimators.size();
498498
for (int i = 0; i < N; i++) {
499-
mWinAnimators.get(i).prepareSurfaceLocked(true);
499+
final WindowStateAnimator winAnimator = mWinAnimators.get(i);
500+
if (winAnimator.mWin.mIsWallpaper && mService.mWallpaperTarget == null) {
501+
if (!winAnimator.mWin.mWallpaperVisible && !winAnimator.mLastHidden) {
502+
// Wallpaper is no longer visible and there is no wp target => hide it.
503+
winAnimator.hide();
504+
}
505+
continue;
506+
}
507+
winAnimator.prepareSurfaceLocked(true);
500508
}
501509

502510
if (mDimParams != null) {

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,10 +1063,7 @@ public void prepareSurfaceLocked(final boolean recoveringMemory) {
10631063

10641064
setSurfaceBoundaries(recoveringMemory);
10651065

1066-
if (mWin.mIsWallpaper && !mWin.mWallpaperVisible) {
1067-
// Wallpaper is no longer visible and there is no wp target => hide it.
1068-
hide();
1069-
} else if (w.mAttachedHidden || !w.isReadyForDisplay()) {
1066+
if (w.mAttachedHidden || !w.isReadyForDisplay()) {
10701067
hide();
10711068
mAnimator.hideWallpapersLocked(w);
10721069

0 commit comments

Comments
 (0)