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

Commit 1fd8a374 authored by Roy Chou's avatar Roy Chou Committed by Android (Google) Code Review
Browse files

Merge "chore(#AlwaysOnMagnifier): Replace string constant with Settings Pref Key"

parents ba362e4f 4c8331b3
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -4384,9 +4384,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
        private final Uri mMagnificationFollowTypingUri = Settings.Secure.getUriFor(
                Settings.Secure.ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED);

        // TODO: replace name with Settings Secure Key
        private final Uri mAlwaysOnMagnificationUri = Settings.Secure.getUriFor(
                "accessibility_magnification_always_on_enabled");
                Settings.Secure.ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED);

        private final Uri mUiContrastUri = Settings.Secure.getUriFor(
                CONTRAST_LEVEL);
@@ -4620,10 +4619,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
    }

    boolean readAlwaysOnMagnificationLocked(AccessibilityUserState userState) {
        // TODO: replace name const with Settings Secure Key
        final boolean isSettingsAlwaysOnEnabled = Settings.Secure.getIntForUser(
                mContext.getContentResolver(),
                "accessibility_magnification_always_on_enabled",
                Settings.Secure.ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED,
                0, userState.mUserId) == 1;
        final boolean isAlwaysOnFeatureFlagEnabled = mMagnificationController
                .isAlwaysOnMagnificationFeatureFlagEnabled();
+2 −4
Original line number Diff line number Diff line
@@ -448,8 +448,7 @@ public class AccessibilityManagerServiceTest {
                mA11yms.getCurrentUserIdLocked());
        Settings.Secure.putIntForUser(
                mTestableContext.getContentResolver(),
                // TODO: replace name with Settings Secure Key
                "accessibility_magnification_always_on_enabled",
                Settings.Secure.ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED,
                1, mA11yms.getCurrentUserIdLocked());

        mA11yms.readAlwaysOnMagnificationLocked(userState);
@@ -466,8 +465,7 @@ public class AccessibilityManagerServiceTest {
                mA11yms.getCurrentUserIdLocked());
        Settings.Secure.putIntForUser(
                mTestableContext.getContentResolver(),
                // TODO: replace name with Settings Secure Key
                "accessibility_magnification_always_on_enabled",
                Settings.Secure.ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED,
                1, mA11yms.getCurrentUserIdLocked());

        mA11yms.readAlwaysOnMagnificationLocked(userState);