Merge "Fix issue with no rounded corners on PIP" into tm-qpr-dev
This commit is contained in:
@@ -411,8 +411,8 @@ public abstract class WMShellBaseModule {
|
|||||||
|
|
||||||
@WMSingleton
|
@WMSingleton
|
||||||
@Provides
|
@Provides
|
||||||
static PipSurfaceTransactionHelper providePipSurfaceTransactionHelper() {
|
static PipSurfaceTransactionHelper providePipSurfaceTransactionHelper(Context context) {
|
||||||
return new PipSurfaceTransactionHelper();
|
return new PipSurfaceTransactionHelper(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@WMSingleton
|
@WMSingleton
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ public class PipSurfaceTransactionHelper {
|
|||||||
private int mCornerRadius;
|
private int mCornerRadius;
|
||||||
private int mShadowRadius;
|
private int mShadowRadius;
|
||||||
|
|
||||||
|
public PipSurfaceTransactionHelper(Context context) {
|
||||||
|
onDensityOrFontScaleChanged(context);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when display size or font size of settings changed
|
* Called when display size or font size of settings changed
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import android.testing.TestableLooper;
|
|||||||
import android.view.SurfaceControl;
|
import android.view.SurfaceControl;
|
||||||
|
|
||||||
import androidx.test.filters.SmallTest;
|
import androidx.test.filters.SmallTest;
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
|
|
||||||
import com.android.wm.shell.MockSurfaceControlHelper;
|
import com.android.wm.shell.MockSurfaceControlHelper;
|
||||||
import com.android.wm.shell.ShellTestCase;
|
import com.android.wm.shell.ShellTestCase;
|
||||||
@@ -62,19 +63,18 @@ public class PipAnimationControllerTest extends ShellTestCase {
|
|||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
private TaskInfo mTaskInfo;
|
private TaskInfo mTaskInfo;
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
private PipAnimationController.PipAnimationCallback mPipAnimationCallback;
|
private PipAnimationController.PipAnimationCallback mPipAnimationCallback;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
mPipAnimationController = new PipAnimationController(
|
MockitoAnnotations.initMocks(this);
|
||||||
new PipSurfaceTransactionHelper());
|
mPipAnimationController = new PipAnimationController(new PipSurfaceTransactionHelper(
|
||||||
|
InstrumentationRegistry.getInstrumentation().getTargetContext()));
|
||||||
mLeash = new SurfaceControl.Builder()
|
mLeash = new SurfaceControl.Builder()
|
||||||
.setContainerLayer()
|
.setContainerLayer()
|
||||||
.setName("FakeLeash")
|
.setName("FakeLeash")
|
||||||
.build();
|
.build();
|
||||||
MockitoAnnotations.initMocks(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user