Merge "chore(#AlwaysOnMagnification): hardcode the feature flag default true" into udc-dev
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -4536,6 +4536,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 -->
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user