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

Commit d5df7e1b authored by Roy Chou's avatar Roy Chou Committed by Automerger Merge Worker
Browse files

Merge changes I995a059c,Ibf78c90b into udc-qpr-dev am: fc7d9f4b

parents c9c684dc fc7d9f4b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -57,8 +57,9 @@ import android.graphics.Rect;
     *
     * @param displayId The logical display id.
     * @param scale the target scale, or {@link Float#NaN} to leave unchanged
     * @param updatePersistence whether the new scale should be persisted in Settings
     */
    void onPerformScaleAction(int displayId, float scale);
    void onPerformScaleAction(int displayId, float scale, boolean updatePersistence);

    /**
     * Called when the accessibility action is performed.
+4 −3
Original line number Diff line number Diff line
@@ -164,8 +164,9 @@ public class MagnificationSettingsController implements ComponentCallbacks {
         *
         * @param displayId The logical display id.
         * @param scale Magnification scale value.
         * @param updatePersistence whether the new scale should be persisted.
         */
        void onMagnifierScale(int displayId, float scale);
        void onMagnifierScale(int displayId, float scale, boolean updatePersistence);

        /**
         * Called when magnification mode changed.
@@ -215,9 +216,9 @@ public class MagnificationSettingsController implements ComponentCallbacks {
        }

        @Override
        public void onMagnifierScale(float scale) {
        public void onMagnifierScale(float scale, boolean updatePersistence) {
            mSettingsControllerCallback.onMagnifierScale(mDisplayId,
                    A11Y_ACTION_SCALE_RANGE.clamp(scale));
                    A11Y_ACTION_SCALE_RANGE.clamp(scale), updatePersistence);
        }
    };
}
+6 −4
Original line number Diff line number Diff line
@@ -333,9 +333,10 @@ public class WindowMagnification implements CoreStartable, CommandQueue.Callback
        }

        @Override
        public void onPerformScaleAction(int displayId, float scale) {
        public void onPerformScaleAction(int displayId, float scale, boolean updatePersistence) {
            if (mWindowMagnificationConnectionImpl != null) {
                mWindowMagnificationConnectionImpl.onPerformScaleAction(displayId, scale);
                mWindowMagnificationConnectionImpl.onPerformScaleAction(
                        displayId, scale, updatePersistence);
            }
        }

@@ -384,9 +385,10 @@ public class WindowMagnification implements CoreStartable, CommandQueue.Callback
        }

        @Override
        public void onMagnifierScale(int displayId, float scale) {
        public void onMagnifierScale(int displayId, float scale, boolean updatePersistence) {
            if (mWindowMagnificationConnectionImpl != null) {
                mWindowMagnificationConnectionImpl.onPerformScaleAction(displayId, scale);
                mWindowMagnificationConnectionImpl.onPerformScaleAction(
                        displayId, scale, updatePersistence);
            }
        }

+2 −2
Original line number Diff line number Diff line
@@ -129,10 +129,10 @@ class WindowMagnificationConnectionImpl extends IWindowMagnificationConnection.S
        }
    }

    void onPerformScaleAction(int displayId, float scale) {
    void onPerformScaleAction(int displayId, float scale, boolean updatePersistence) {
        if (mConnectionCallback != null) {
            try {
                mConnectionCallback.onPerformScaleAction(displayId, scale);
                mConnectionCallback.onPerformScaleAction(displayId, scale, updatePersistence);
            } catch (RemoteException e) {
                Log.e(TAG, "Failed to inform performing scale action", e);
            }
+2 −1
Original line number Diff line number Diff line
@@ -1511,7 +1511,8 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold

        private void performScale(float scale) {
            scale = A11Y_ACTION_SCALE_RANGE.clamp(scale);
            mWindowMagnifierCallback.onPerformScaleAction(mDisplayId, scale);
            mWindowMagnifierCallback.onPerformScaleAction(
                    mDisplayId, scale, /* updatePersistence= */ true);
        }
    }
}
 No newline at end of file
Loading