Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +5 −0 Original line number Diff line number Diff line Loading @@ -761,6 +761,11 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> released = true; } if (mTaskSurface != null) { t.unsetColor(mTaskSurface); released = true; } if (released) { t.apply(); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration2.kt +2 −7 Original line number Diff line number Diff line Loading @@ -473,20 +473,15 @@ abstract class WindowDecoration2<T>( /** Releases all window decoration views. */ private fun releaseViews(wct: WindowContainerTransaction) { val t = surfaceControlTransactionSupplier() var released = false decorationContainerSurface?.let { t.remove(it) decorationContainerSurface = null released = true } released = released or (captionController?.releaseViews(wct, t) == true) if (released) { t.unsetColor(taskSurface) t.apply() } } override fun close() = traceSection( traceTag = Trace.TRACE_TAG_WINDOW_MANAGER, Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; Loading Loading @@ -1314,7 +1315,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { spyWindowDecor.relayout(taskInfo, true /* hasGlobalFocus */, mExclusionRegion); verify(mMockTransaction).apply(); // Apply is also invoked when the color of the Task Surface is reset. verify(mMockTransaction, times(2)).apply(); verify(mMockRootSurfaceControl, never()).applyTransactionOnDraw(any()); } Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -398,7 +398,9 @@ public class WindowDecorationTests extends ShellTestCase { windowDecor.relayout(taskInfo, true /* hasGlobalFocus */); verify(mMockWindowDecorViewHost, never()).release(any()); verify(t, never()).apply(); // Apply is invoked because a task surfaces needs to be always reset with unsetColor. verify(t).unsetColor(any()); verify(t).apply(); verify(mMockWindowContainerTransaction, never()) .removeInsetsSource(eq(taskInfo.token), any(), anyInt(), anyInt()); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +5 −0 Original line number Diff line number Diff line Loading @@ -761,6 +761,11 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> released = true; } if (mTaskSurface != null) { t.unsetColor(mTaskSurface); released = true; } if (released) { t.apply(); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration2.kt +2 −7 Original line number Diff line number Diff line Loading @@ -473,20 +473,15 @@ abstract class WindowDecoration2<T>( /** Releases all window decoration views. */ private fun releaseViews(wct: WindowContainerTransaction) { val t = surfaceControlTransactionSupplier() var released = false decorationContainerSurface?.let { t.remove(it) decorationContainerSurface = null released = true } released = released or (captionController?.releaseViews(wct, t) == true) if (released) { t.unsetColor(taskSurface) t.apply() } } override fun close() = traceSection( traceTag = Trace.TRACE_TAG_WINDOW_MANAGER, Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; Loading Loading @@ -1314,7 +1315,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { spyWindowDecor.relayout(taskInfo, true /* hasGlobalFocus */, mExclusionRegion); verify(mMockTransaction).apply(); // Apply is also invoked when the color of the Task Surface is reset. verify(mMockTransaction, times(2)).apply(); verify(mMockRootSurfaceControl, never()).applyTransactionOnDraw(any()); } Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -398,7 +398,9 @@ public class WindowDecorationTests extends ShellTestCase { windowDecor.relayout(taskInfo, true /* hasGlobalFocus */); verify(mMockWindowDecorViewHost, never()).release(any()); verify(t, never()).apply(); // Apply is invoked because a task surfaces needs to be always reset with unsetColor. verify(t).unsetColor(any()); verify(t).apply(); verify(mMockWindowContainerTransaction, never()) .removeInsetsSource(eq(taskInfo.token), any(), anyInt(), anyInt()); Loading