chore(#AlwaysOnMagnification): hardcode the feature flag default true
Set the feature flag default to be true to rollout to public, also keep the feature flag file existing so that it's still remote controllable. Bug: 281788002 Test: manually test with adb command Change-Id: I71210e2d82b2c67be078cf4532b3434c084404af
This commit is contained in:
@@ -3711,6 +3711,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>
|
||||
|
||||
|
||||
@@ -4528,6 +4528,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public class MagnificationController implements WindowMagnificationManager.Callb
|
||||
mSupportWindowMagnification = context.getPackageManager().hasSystemFeature(
|
||||
FEATURE_WINDOW_MAGNIFICATION);
|
||||
|
||||
mAlwaysOnMagnificationFeatureFlag = new AlwaysOnMagnificationFeatureFlag();
|
||||
mAlwaysOnMagnificationFeatureFlag = new AlwaysOnMagnificationFeatureFlag(context);
|
||||
mAlwaysOnMagnificationFeatureFlag.addOnChangedListener(
|
||||
ConcurrentUtils.DIRECT_EXECUTOR, mAms::updateAlwaysOnMagnification);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user