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

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

Merge "chore(#AlwaysOnMagnification): hardcode the feature flag default true"...

Merge "chore(#AlwaysOnMagnification): hardcode the feature flag default true" into udc-dev am: 419aa759

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



Change-Id: Ia160889a35f1dcb885d6087e7d89a8acfa65ffbc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 717c6e9f 419aa759
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3718,6 +3718,10 @@
         magnification settings and adjust the default magnification capability.  -->
    <bool name="config_magnification_area">true</bool>

    <!-- The default value for always on magnification feature flag if the remote feature
         flag does not exist -->
    <bool name="config_magnification_always_on_enabled">true</bool>

    <!-- If true, the display will be shifted around in ambient mode. -->
    <bool name="config_enableBurnInProtection">false</bool>

+1 −0
Original line number Diff line number Diff line
@@ -4537,6 +4537,7 @@
  <java-symbol type="string" name="dismiss_action" />

  <java-symbol type="bool" name="config_magnification_area" />
  <java-symbol type="bool" name="config_magnification_always_on_enabled" />

  <java-symbol type="bool" name="config_trackerAppNeedsPermissions"/>
  <!-- FullScreenMagnification thumbnail -->
+11 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.server.accessibility.magnification;

import android.annotation.NonNull;
import android.content.Context;
import android.provider.DeviceConfig;

/**
@@ -29,6 +31,13 @@ public class AlwaysOnMagnificationFeatureFlag extends MagnificationFeatureFlagBa
    private static final String FEATURE_NAME_ENABLE_ALWAYS_ON_MAGNIFICATION =
            "AlwaysOnMagnifier__enable_always_on_magnifier";

    private @NonNull Context mContext;

    AlwaysOnMagnificationFeatureFlag(@NonNull Context context) {
        super();
        mContext = context;
    }

    @Override
    String getNamespace() {
        return NAMESPACE;
@@ -41,6 +50,7 @@ public class AlwaysOnMagnificationFeatureFlag extends MagnificationFeatureFlagBa

    @Override
    boolean getDefaultValue() {
        return false;
        return mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_magnification_always_on_enabled);
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ public class MagnificationController implements WindowMagnificationManager.Callb
        mSupportWindowMagnification = context.getPackageManager().hasSystemFeature(
                FEATURE_WINDOW_MAGNIFICATION);

        mAlwaysOnMagnificationFeatureFlag = new AlwaysOnMagnificationFeatureFlag();
        mAlwaysOnMagnificationFeatureFlag = new AlwaysOnMagnificationFeatureFlag(context);
        mAlwaysOnMagnificationFeatureFlag.addOnChangedListener(
                mBackgroundExecutor, mAms::updateAlwaysOnMagnification);
    }