Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d13455d authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Revert "Fix exit from DW for Transparent activities"

This reverts commit afe5ffb4.

Reason for revert: b/432976351

Change-Id: Ia3e8004a272e4d5f54902d532a05a216520d26ce
parent afe5ffb4
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -761,11 +761,6 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
            released = true;
        }

        if (mTaskSurface != null) {
            t.unsetColor(mTaskSurface);
            released = true;
        }

        if (released) {
            t.apply();
        }
+7 −2
Original line number Diff line number Diff line
@@ -473,15 +473,20 @@ 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
        }

        t.unsetColor(taskSurface)
        released = released or (captionController?.releaseViews(wct, t) == true)

        if (released) {
            t.apply()
        }
    }

    override fun close() = traceSection(
        traceTag = Trace.TRACE_TAG_WINDOW_MANAGER,
+1 −3
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ 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;

@@ -1315,8 +1314,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {

        spyWindowDecor.relayout(taskInfo, true /* hasGlobalFocus */, mExclusionRegion);

        // Apply is also invoked when the color of the Task Surface is reset.
        verify(mMockTransaction, times(2)).apply();
        verify(mMockTransaction).apply();
        verify(mMockRootSurfaceControl, never()).applyTransactionOnDraw(any());
    }

+1 −3
Original line number Diff line number Diff line
@@ -398,9 +398,7 @@ public class WindowDecorationTests extends ShellTestCase {
        windowDecor.relayout(taskInfo, true /* hasGlobalFocus */);

        verify(mMockWindowDecorViewHost, never()).release(any());
        // Apply is invoked because a task surfaces needs to be always reset with unsetColor.
        verify(t).unsetColor(any());
        verify(t).apply();
        verify(t, never()).apply();
        verify(mMockWindowContainerTransaction, never())
                .removeInsetsSource(eq(taskInfo.token), any(), anyInt(), anyInt());