File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
services/java/com/android/server/wm Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments