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

Commit 5ab3134c authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Put PiP layer behind input consumer when resize" into main

parents 82a40c69 1a3298cb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -242,7 +242,9 @@ public class PipSurfaceTransactionHelper {

        round(outTransaction, leash, baseBounds, toBounds);
        outTransaction.setMatrix(leash, mTmpTransform, mTmpFloat9);
        outTransaction.setLayer(leash, Integer.MAX_VALUE);
        // Note: Put this at layer=MAX_VALUE-2 since the input consumer for PIP is placed at
        //       MAX_VALUE-1
        outTransaction.setLayer(leash, Integer.MAX_VALUE - 2);
        return this;
    }

+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static org.mockito.AdditionalMatchers.aryEq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyFloat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.intThat;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -232,6 +233,7 @@ public class PipSurfaceTransactionHelperTest {
                PIP_BOUNDS, 0);

        verify(mMockTransaction).setMatrix(eq(mTestLeash), any(), any());
        verify(mMockTransaction).setLayer(eq(mTestLeash), eq(Integer.MAX_VALUE));
        verify(mMockTransaction).setLayer(eq(mTestLeash),
                intThat((layer) -> layer < Integer.MAX_VALUE));
    }
}