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

Commit a9ce4a42 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make PiP window always in front while dragging across displays." into main

parents f880c8e4 4359d2b2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -242,6 +242,7 @@ public class PipSurfaceTransactionHelper {

        round(outTransaction, leash, baseBounds, toBounds);
        outTransaction.setMatrix(leash, mTmpTransform, mTmpFloat9);
        outTransaction.setLayer(leash, Integer.MAX_VALUE);
        return this;
    }

+11 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import static org.mockito.Mockito.when;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Rect;
import android.gui.BorderSettings;
import android.gui.BoxShadowSettings;
import android.platform.test.annotations.EnableFlags;
@@ -62,6 +63,7 @@ public class PipSurfaceTransactionHelperTest {
    private static final int CORNER_RADIUS = 10;
    private static final int SHADOW_RADIUS = 20;
    private static final float MIRROR_OPACITY = 0.5f;
    private static final Rect PIP_BOUNDS = new Rect(0, 0, 500, 500);

    private final BoxShadowSettings mLightBoxShadowSettings = new BoxShadowSettings();
    private final BorderSettings mLightBorderSettings = new BorderSettings();
@@ -223,4 +225,13 @@ public class PipSurfaceTransactionHelperTest {
        verify(mMockTransaction).setLayer(eq(mTestLeash), eq(Integer.MAX_VALUE));
        verify(mMockTransaction).show(eq(mTestLeash));
    }

    @Test
    public void setPipTransformations_setsMatrixAndLayer() {
        mPipSurfaceTransactionHelper.setPipTransformations(mTestLeash, mMockTransaction, PIP_BOUNDS,
                PIP_BOUNDS, 0);

        verify(mMockTransaction).setMatrix(eq(mTestLeash), any(), any());
        verify(mMockTransaction).setLayer(eq(mTestLeash), eq(Integer.MAX_VALUE));
    }
}