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

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

Merge "fix(#Magnification): mis-use non resoure id in resource getter when...

Merge "fix(#Magnification): mis-use non resoure id in resource getter when magnification capability setup" am: 085797df

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2628770



Change-Id: I2267fa6c8a1549d796c8c5b6813ec4482663575d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 21d5ffb8 085797df
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -5001,14 +5001,15 @@ public class SettingsProvider extends ContentProvider {
                            Secure.ACCESSIBILITY_MAGNIFICATION_CAPABILITY);
                    final boolean supportMagnificationArea = getContext().getResources().getBoolean(
                            com.android.internal.R.bool.config_magnification_area);
                    final int capability = supportMagnificationArea
                            ? R.integer.def_accessibility_magnification_capabilities
                            : Secure.ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN;
                    final String supportShowPrompt = supportMagnificationArea ? "1" : "0";
                    if (magnificationCapabilities.isNull()) {
                        final int capability = supportMagnificationArea
                                ? getContext().getResources().getInteger(
                                        R.integer.def_accessibility_magnification_capabilities)
                                : Secure.ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN;
                        secureSettings.insertSettingLocked(
                                Secure.ACCESSIBILITY_MAGNIFICATION_CAPABILITY,
                                String.valueOf(getContext().getResources().getInteger(capability)),
                                String.valueOf(capability),
                                null, true, SettingsState.SYSTEM_PACKAGE_NAME);

                        if (isMagnificationSettingsOn(secureSettings)) {