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

Set the feature flag getter default return value to be true to rollout to public. We keep the checking code so that it's still remote controllable.

Bug: 281788002
Test: manually test with adb command
Change-Id: Ie7f32721cf99d8a97c11f0f9c6d0d466c083d668
This commit is contained in:
Roy Chou
2023-05-12 03:32:34 +00:00
parent 8060347ec6
commit 0aa67ede68

View File

@@ -249,12 +249,18 @@ public class ToggleScreenMagnificationPreferenceFragment extends
super.onProcessArguments(arguments);
}
private void addAlwaysOnSetting(PreferenceCategory generalCategory) {
if (!DeviceConfig.getBoolean(
private boolean isAlwaysOnSettingEnabled() {
final boolean defaultValue = getContext().getResources().getBoolean(
com.android.internal.R.bool.config_magnification_always_on_enabled);
return DeviceConfig.getBoolean(
DeviceConfig.NAMESPACE_WINDOW_MANAGER,
"AlwaysOnMagnifier__enable_always_on_magnifier",
false
)) {
defaultValue
);
}
private void addAlwaysOnSetting(PreferenceCategory generalCategory) {
if (!isAlwaysOnSettingEnabled()) {
return;
}