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

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

Merge changes I0bae5a07,I7c9a61af,I372e0abc into main

* changes:
  fix(fullscreen magnification): Create connecting methods between SystemServer and SystemUI for fullscreen mode
  fix(fullscreen magnification): add flag for drawing fullscreen magnification border in SystemUI
  fix(fullscreen magnification): Create the flag for fixing fullscreen magnification border
parents fbca6e54 2b073bd3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -124,4 +124,9 @@ oneway interface IMagnificationConnection {
     * @param scale magnification scale.
     */
    void onUserMagnificationScaleChanged(int userId, int displayId, float scale);

    /**
     * Notify the changes of fullscreen magnification activation on the specified display
     */
    void onFullscreenMagnificationActivationChanged(int displayId, boolean activated);
}
+7 −0
Original line number Diff line number Diff line
@@ -6,3 +6,10 @@ flag {
  description: "The flag controls whether the intersection check for non-magnifiable windows is needed when onWindowTransition,"
  bug: "312624253"
}

flag {
  name: "magnification_always_draw_fullscreen_border"
  namespace: "accessibility"
  description: "Always draw fullscreen orange border in fullscreen magnification"
  bug: "291891390"
}
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
@@ -273,6 +273,10 @@ public class Magnification implements CoreStartable, CommandQueue.Callbacks {
        }
    }

    void onFullscreenMagnificationActivationChanged(int displayId, boolean activated) {
        // Do nothing
    }

    @MainThread
    void toggleSettingsPanelVisibility(int displayId) {
        final MagnificationSettingsController magnificationSettingsController =
+6 −0
Original line number Diff line number Diff line
@@ -46,6 +46,12 @@ class MagnificationConnectionImpl extends IMagnificationConnection.Stub {
        mHandler = mainHandler;
    }

    @Override
    public void onFullscreenMagnificationActivationChanged(int displayId, boolean activated) {
        mHandler.post(() -> mMagnification
                .onFullscreenMagnificationActivationChanged(displayId, activated));
    }

    @Override
    public void enableWindowMagnification(int displayId, float scale, float centerX, float centerY,
            float magnificationFrameOffsetRatioX, float magnificationFrameOffsetRatioY,
+11 −4
Original line number Diff line number Diff line
@@ -3460,13 +3460,20 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
        if (!mMagnificationController.supportWindowMagnification()) {
            return;
        }
        final boolean connect = (userState.isShortcutMagnificationEnabledLocked()

        final boolean shortcutEnabled = (userState.isShortcutMagnificationEnabledLocked()
                || userState.isMagnificationSingleFingerTripleTapEnabledLocked()
                || (Flags.enableMagnificationMultipleFingerMultipleTapGesture()
                && userState.isMagnificationTwoFingerTripleTapEnabledLocked()))
                && (userState.getMagnificationCapabilitiesLocked()
                != Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN)
                    && userState.isMagnificationTwoFingerTripleTapEnabledLocked()));

        final boolean createConnectionForCurrentCapability =
                com.android.window.flags.Flags.magnificationAlwaysDrawFullscreenBorder()
                        || (userState.getMagnificationCapabilitiesLocked()
                                != Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN);

        final boolean connect = (shortcutEnabled && createConnectionForCurrentCapability)
                || userHasMagnificationServicesLocked(userState);

        getMagnificationConnectionManager().requestConnection(connect);
    }

Loading