Loading services/java/com/android/server/wm/WindowAnimator.java +16 −5 Original line number Diff line number Diff line Loading @@ -85,14 +85,21 @@ public class WindowAnimator { mPolicy = policy; } void hideWallpapersLocked() { void hideWallpapersLocked(final WindowState w) { if ((mService.mWallpaperTarget == w && mService.mLowerWallpaperTarget == null) || mService.mWallpaperTarget == null) { for (final WindowToken token : mService.mWallpaperTokens) { for (final WindowState wallpaper : token.windows) { wallpaper.mWinAnimator.hide(); final WindowStateAnimator winAnimator = wallpaper.mWinAnimator; if (!winAnimator.mLastHidden) { winAnimator.hide(); mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } } token.hidden = true; } } } private void testWallpaperAndBackgroundLocked() { if (mWindowDetachedWallpaper != mDetachedWallpaper) { Loading Loading @@ -491,6 +498,10 @@ public class WindowAnimator { for (int i = 0; i < N; i++) { final WindowStateAnimator winAnimator = mWinAnimators.get(i); if (winAnimator.mWin.mIsWallpaper && mService.mWallpaperTarget == null) { if (!winAnimator.mWin.mWallpaperVisible && !winAnimator.mLastHidden) { // Wallpaper is no longer visible and there is no wp target => hide it. winAnimator.hide(); } continue; } winAnimator.prepareSurfaceLocked(true); Loading services/java/com/android/server/wm/WindowStateAnimator.java +5 −10 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.Region; import android.os.Debug; import android.os.RemoteException; import android.util.Slog; import android.view.Surface; import android.view.SurfaceSession; Loading Loading @@ -379,10 +378,7 @@ class WindowStateAnimator { mService.mPendingRemove.add(mWin); mWin.mRemoveOnExit = false; } if (mService.mWallpaperTarget == mWin && mService.mLowerWallpaperTarget == null) { mAnimator.hideWallpapersLocked(); mAnimator.mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } mAnimator.hideWallpapersLocked(mWin); } void hide() { Loading Loading @@ -738,6 +734,7 @@ class WindowStateAnimator { } mSurface.destroy(); } mAnimator.hideWallpapersLocked(mWin); } catch (RuntimeException e) { Slog.w(TAG, "Exception thrown when destroying Window " + this + " surface " + mSurface + " session " + mSession Loading @@ -763,6 +760,7 @@ class WindowStateAnimator { WindowManagerService.logSurface(mWin, "DESTROY PENDING", e); } mPendingDestroySurface.destroy(); mAnimator.hideWallpapersLocked(mWin); } } catch (RuntimeException e) { Slog.w(TAG, "Exception thrown when destroying Window " Loading Loading @@ -1067,11 +1065,8 @@ class WindowStateAnimator { if (w.mAttachedHidden || !w.isReadyForDisplay()) { hide(); // TODO: Consider moving the following into hide() and out of finishExit() as well. if (mService.mWallpaperTarget == mWin && mService.mLowerWallpaperTarget == null) { mAnimator.hideWallpapersLocked(); mAnimator.mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } mAnimator.hideWallpapersLocked(w); // If we are waiting for this window to handle an // orientation change, well, it is hidden, so // doesn't really matter. Note that this does Loading Loading
services/java/com/android/server/wm/WindowAnimator.java +16 −5 Original line number Diff line number Diff line Loading @@ -85,14 +85,21 @@ public class WindowAnimator { mPolicy = policy; } void hideWallpapersLocked() { void hideWallpapersLocked(final WindowState w) { if ((mService.mWallpaperTarget == w && mService.mLowerWallpaperTarget == null) || mService.mWallpaperTarget == null) { for (final WindowToken token : mService.mWallpaperTokens) { for (final WindowState wallpaper : token.windows) { wallpaper.mWinAnimator.hide(); final WindowStateAnimator winAnimator = wallpaper.mWinAnimator; if (!winAnimator.mLastHidden) { winAnimator.hide(); mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } } token.hidden = true; } } } private void testWallpaperAndBackgroundLocked() { if (mWindowDetachedWallpaper != mDetachedWallpaper) { Loading Loading @@ -491,6 +498,10 @@ public class WindowAnimator { for (int i = 0; i < N; i++) { final WindowStateAnimator winAnimator = mWinAnimators.get(i); if (winAnimator.mWin.mIsWallpaper && mService.mWallpaperTarget == null) { if (!winAnimator.mWin.mWallpaperVisible && !winAnimator.mLastHidden) { // Wallpaper is no longer visible and there is no wp target => hide it. winAnimator.hide(); } continue; } winAnimator.prepareSurfaceLocked(true); Loading
services/java/com/android/server/wm/WindowStateAnimator.java +5 −10 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.Region; import android.os.Debug; import android.os.RemoteException; import android.util.Slog; import android.view.Surface; import android.view.SurfaceSession; Loading Loading @@ -379,10 +378,7 @@ class WindowStateAnimator { mService.mPendingRemove.add(mWin); mWin.mRemoveOnExit = false; } if (mService.mWallpaperTarget == mWin && mService.mLowerWallpaperTarget == null) { mAnimator.hideWallpapersLocked(); mAnimator.mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } mAnimator.hideWallpapersLocked(mWin); } void hide() { Loading Loading @@ -738,6 +734,7 @@ class WindowStateAnimator { } mSurface.destroy(); } mAnimator.hideWallpapersLocked(mWin); } catch (RuntimeException e) { Slog.w(TAG, "Exception thrown when destroying Window " + this + " surface " + mSurface + " session " + mSession Loading @@ -763,6 +760,7 @@ class WindowStateAnimator { WindowManagerService.logSurface(mWin, "DESTROY PENDING", e); } mPendingDestroySurface.destroy(); mAnimator.hideWallpapersLocked(mWin); } } catch (RuntimeException e) { Slog.w(TAG, "Exception thrown when destroying Window " Loading Loading @@ -1067,11 +1065,8 @@ class WindowStateAnimator { if (w.mAttachedHidden || !w.isReadyForDisplay()) { hide(); // TODO: Consider moving the following into hide() and out of finishExit() as well. if (mService.mWallpaperTarget == mWin && mService.mLowerWallpaperTarget == null) { mAnimator.hideWallpapersLocked(); mAnimator.mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; } mAnimator.hideWallpapersLocked(w); // If we are waiting for this window to handle an // orientation change, well, it is hidden, so // doesn't really matter. Note that this does Loading