Loading services/core/java/com/android/server/wm/WindowState.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -4297,6 +4297,15 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean wasVisible = isVisibleLw(); final boolean wasVisible = isVisibleLw(); result |= (!wasVisible || !isDrawnLw()) ? RELAYOUT_RES_FIRST_TIME : 0; result |= (!wasVisible || !isDrawnLw()) ? RELAYOUT_RES_FIRST_TIME : 0; if (mWinAnimator.mChildrenDetached) { // If there are detached children hanging around we need to force // the client receiving a new Surface. mWinAnimator.preserveSurfaceLocked(); result |= RELAYOUT_RES_SURFACE_CHANGED | RELAYOUT_RES_FIRST_TIME; } if (mAnimatingExit) { if (mAnimatingExit) { Slog.d(TAG, "relayoutVisibleWindow: " + this + " mAnimatingExit=true, mRemoveOnExit=" Slog.d(TAG, "relayoutVisibleWindow: " + this + " mAnimatingExit=true, mRemoveOnExit=" + mRemoveOnExit + ", mDestroying=" + mDestroying); + mRemoveOnExit + ", mDestroying=" + mDestroying); Loading services/core/java/com/android/server/wm/WindowStateAnimator.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -221,6 +221,10 @@ class WindowStateAnimator { private final SurfaceControl.Transaction mReparentTransaction = new SurfaceControl.Transaction(); private final SurfaceControl.Transaction mReparentTransaction = new SurfaceControl.Transaction(); // Used to track whether we have called detach children on the way to invisibility, in which // case we need to give the client a new Surface if it lays back out to a visible state. boolean mChildrenDetached = false; WindowStateAnimator(final WindowState win) { WindowStateAnimator(final WindowState win) { final WindowManagerService service = win.mService; final WindowManagerService service = win.mService; Loading Loading @@ -430,6 +434,7 @@ class WindowStateAnimator { if (mSurfaceController != null) { if (mSurfaceController != null) { return mSurfaceController; return mSurfaceController; } } mChildrenDetached = false; if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0) { if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0) { windowType = SurfaceControl.WINDOW_TYPE_DONT_SCREENSHOT; windowType = SurfaceControl.WINDOW_TYPE_DONT_SCREENSHOT; Loading Loading @@ -1478,6 +1483,7 @@ class WindowStateAnimator { if (mSurfaceController != null) { if (mSurfaceController != null) { mSurfaceController.detachChildren(); mSurfaceController.detachChildren(); } } mChildrenDetached = true; } } int getLayer() { int getLayer() { Loading Loading
services/core/java/com/android/server/wm/WindowState.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -4297,6 +4297,15 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean wasVisible = isVisibleLw(); final boolean wasVisible = isVisibleLw(); result |= (!wasVisible || !isDrawnLw()) ? RELAYOUT_RES_FIRST_TIME : 0; result |= (!wasVisible || !isDrawnLw()) ? RELAYOUT_RES_FIRST_TIME : 0; if (mWinAnimator.mChildrenDetached) { // If there are detached children hanging around we need to force // the client receiving a new Surface. mWinAnimator.preserveSurfaceLocked(); result |= RELAYOUT_RES_SURFACE_CHANGED | RELAYOUT_RES_FIRST_TIME; } if (mAnimatingExit) { if (mAnimatingExit) { Slog.d(TAG, "relayoutVisibleWindow: " + this + " mAnimatingExit=true, mRemoveOnExit=" Slog.d(TAG, "relayoutVisibleWindow: " + this + " mAnimatingExit=true, mRemoveOnExit=" + mRemoveOnExit + ", mDestroying=" + mDestroying); + mRemoveOnExit + ", mDestroying=" + mDestroying); Loading
services/core/java/com/android/server/wm/WindowStateAnimator.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -221,6 +221,10 @@ class WindowStateAnimator { private final SurfaceControl.Transaction mReparentTransaction = new SurfaceControl.Transaction(); private final SurfaceControl.Transaction mReparentTransaction = new SurfaceControl.Transaction(); // Used to track whether we have called detach children on the way to invisibility, in which // case we need to give the client a new Surface if it lays back out to a visible state. boolean mChildrenDetached = false; WindowStateAnimator(final WindowState win) { WindowStateAnimator(final WindowState win) { final WindowManagerService service = win.mService; final WindowManagerService service = win.mService; Loading Loading @@ -430,6 +434,7 @@ class WindowStateAnimator { if (mSurfaceController != null) { if (mSurfaceController != null) { return mSurfaceController; return mSurfaceController; } } mChildrenDetached = false; if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0) { if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0) { windowType = SurfaceControl.WINDOW_TYPE_DONT_SCREENSHOT; windowType = SurfaceControl.WINDOW_TYPE_DONT_SCREENSHOT; Loading Loading @@ -1478,6 +1483,7 @@ class WindowStateAnimator { if (mSurfaceController != null) { if (mSurfaceController != null) { mSurfaceController.detachChildren(); mSurfaceController.detachChildren(); } } mChildrenDetached = true; } } int getLayer() { int getLayer() { Loading