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

Commit 17e1eec6 authored by Candice Lo's avatar Candice Lo Committed by Android (Google) Code Review
Browse files

Merge changes Ie629ca85,I378764c6 into main

* changes:
  (refactor) Move non-UI related components out of MagnifiedViewport
  (refactor) Updating the field name mIsFullscreenMagnificationActivated
parents 0129433f ed652bd1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -599,7 +599,7 @@ public class FullScreenMagnificationController implements
                    callback.onFullScreenMagnificationActivationState(
                            mDisplayId, mMagnificationActivated);
                });
                mControllerCtx.getWindowManager().setForceShowMagnifiableBounds(
                mControllerCtx.getWindowManager().setFullscreenMagnificationActivated(
                        mDisplayId, activated);
            }

+237 −233

File changed.

Preview size limit exceeded, changes collapsed.

+3 −4
Original line number Diff line number Diff line
@@ -409,13 +409,12 @@ public abstract class WindowManagerInternal {
    public abstract void setMagnificationSpec(int displayId, MagnificationSpec spec);

    /**
     * Set by the accessibility framework to indicate whether the magnifiable regions of the display
     * should be shown.
     * Set by the accessibility framework to indicate whether fullscreen magnification is activated.
     *
     * @param displayId The logical display id.
     * @param show {@code true} to show magnifiable region bounds, {@code false} to hide
     * @param activated The activation of fullscreen magnification
     */
    public abstract void setForceShowMagnifiableBounds(int displayId, boolean show);
    public abstract void setFullscreenMagnificationActivated(int displayId, boolean activated);

    /**
     * Obtains the magnification regions.
+3 −2
Original line number Diff line number Diff line
@@ -7858,10 +7858,11 @@ public class WindowManagerService extends IWindowManager.Stub
        }

        @Override
        public void setForceShowMagnifiableBounds(int displayId, boolean show) {
        public void setFullscreenMagnificationActivated(int displayId, boolean activated) {
            synchronized (mGlobalLock) {
                if (mAccessibilityController.hasCallbacks()) {
                    mAccessibilityController.setForceShowMagnifiableBounds(displayId, show);
                    mAccessibilityController
                            .setFullscreenMagnificationActivated(displayId, activated);
                } else {
                    throw new IllegalStateException("Magnification callbacks not set!");
                }
+1 −1
Original line number Diff line number Diff line
@@ -1360,7 +1360,7 @@ public class FullScreenMagnificationControllerTest {
                DISPLAY_0, scale, Float.NaN, Float.NaN, true, SERVICE_ID_1);

        checkActivatedAndMagnifying(/* activated= */ true, /* magnifying= */ false, DISPLAY_0);
        verify(mMockWindowManager).setForceShowMagnifiableBounds(DISPLAY_0, true);
        verify(mMockWindowManager).setFullscreenMagnificationActivated(DISPLAY_0, true);
    }

    @Test