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

Commit 65231dc6 authored by Massimo Carli's avatar Massimo Carli
Browse files

[2/n] Integrate OptPropBuilder in LetterboxUiController

Fix: 318801382
Test: atest WmTests:LetterboxUiControllerTest
Test: atest WmTests:DisplayRotationCompatPolicyTests

Change-Id: Id5ccfb6fc0461fcd93c2756e55b8b74d29add53d
parent 6b672943
Loading
Loading
Loading
Loading
+125 −260

File changed.

Preview size limit exceeded, changes collapsed.

+5 −4
Original line number Diff line number Diff line
@@ -258,8 +258,8 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
    public void testTreatmentDisabledPerApp_noForceRotationOrRefresh()
            throws Exception {
        configureActivity(SCREEN_ORIENTATION_PORTRAIT);
        when(mActivity.mLetterboxUiController.shouldForceRotateForCameraCompat())
                .thenReturn(false);
        doReturn(false).when(mActivity.mLetterboxUiController)
                .shouldForceRotateForCameraCompat();

        mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);

@@ -459,8 +459,9 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
    public void testOnActivityConfigurationChanging_refreshDisabledViaFlag_noRefresh()
            throws Exception {
        configureActivity(SCREEN_ORIENTATION_PORTRAIT);
        when(mActivity.mLetterboxUiController.shouldRefreshActivityForCameraCompat())
                .thenReturn(false);

        doReturn(false).when(
                mActivity.mLetterboxUiController).shouldRefreshActivityForCameraCompat();

        mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);
        callOnActivityConfigurationChanging(mActivity, /* isDisplayRotationChanging */ true);