Loading libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIConfiguration.java +12 −6 Original line number Diff line number Diff line Loading @@ -36,11 +36,15 @@ import javax.inject.Inject; public class CompatUIConfiguration implements DeviceConfig.OnPropertiesChangedListener { private static final String KEY_ENABLE_LETTERBOX_RESTART_DIALOG = "enable_letterbox_restart_dialog"; "enable_letterbox_restart_confirmation_dialog"; private static final String KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION = "enable_letterbox_reachability_education"; private static final boolean DEFAULT_VALUE_ENABLE_LETTERBOX_RESTART_DIALOG = true; private static final boolean DEFAULT_VALUE_ENABLE_LETTERBOX_REACHABILITY_EDUCATION = false; /** * The name of the {@link SharedPreferences} that holds which user has seen the Restart * confirmation dialog. Loading Loading @@ -77,10 +81,11 @@ public class CompatUIConfiguration implements DeviceConfig.OnPropertiesChangedLi mIsReachabilityEducationEnabled = context.getResources().getBoolean( R.bool.config_letterboxIsReachabilityEducationEnabled); mIsLetterboxRestartDialogAllowed = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_RESTART_DIALOG, false); DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_RESTART_DIALOG, DEFAULT_VALUE_ENABLE_LETTERBOX_RESTART_DIALOG); mIsLetterboxReachabilityEducationAllowed = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION, false); DEFAULT_VALUE_ENABLE_LETTERBOX_REACHABILITY_EDUCATION); DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_APP_COMPAT, mainExecutor, this); mSharedPreferences = context.getSharedPreferences(DONT_SHOW_RESTART_DIALOG_PREF_NAME, Loading Loading @@ -133,16 +138,17 @@ public class CompatUIConfiguration implements DeviceConfig.OnPropertiesChangedLi @Override public void onPropertiesChanged(@NonNull DeviceConfig.Properties properties) { // TODO(b/263349751): Update flag and default value to true if (properties.getKeyset().contains(KEY_ENABLE_LETTERBOX_RESTART_DIALOG)) { mIsLetterboxRestartDialogAllowed = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_RESTART_DIALOG, false); DEFAULT_VALUE_ENABLE_LETTERBOX_RESTART_DIALOG); } // TODO(b/263349751): Update flag and default value to true if (properties.getKeyset().contains(KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION)) { mIsLetterboxReachabilityEducationAllowed = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION, false); KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION, DEFAULT_VALUE_ENABLE_LETTERBOX_REACHABILITY_EDUCATION); } } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIConfiguration.java +12 −6 Original line number Diff line number Diff line Loading @@ -36,11 +36,15 @@ import javax.inject.Inject; public class CompatUIConfiguration implements DeviceConfig.OnPropertiesChangedListener { private static final String KEY_ENABLE_LETTERBOX_RESTART_DIALOG = "enable_letterbox_restart_dialog"; "enable_letterbox_restart_confirmation_dialog"; private static final String KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION = "enable_letterbox_reachability_education"; private static final boolean DEFAULT_VALUE_ENABLE_LETTERBOX_RESTART_DIALOG = true; private static final boolean DEFAULT_VALUE_ENABLE_LETTERBOX_REACHABILITY_EDUCATION = false; /** * The name of the {@link SharedPreferences} that holds which user has seen the Restart * confirmation dialog. Loading Loading @@ -77,10 +81,11 @@ public class CompatUIConfiguration implements DeviceConfig.OnPropertiesChangedLi mIsReachabilityEducationEnabled = context.getResources().getBoolean( R.bool.config_letterboxIsReachabilityEducationEnabled); mIsLetterboxRestartDialogAllowed = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_RESTART_DIALOG, false); DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_RESTART_DIALOG, DEFAULT_VALUE_ENABLE_LETTERBOX_RESTART_DIALOG); mIsLetterboxReachabilityEducationAllowed = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION, false); DEFAULT_VALUE_ENABLE_LETTERBOX_REACHABILITY_EDUCATION); DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_APP_COMPAT, mainExecutor, this); mSharedPreferences = context.getSharedPreferences(DONT_SHOW_RESTART_DIALOG_PREF_NAME, Loading Loading @@ -133,16 +138,17 @@ public class CompatUIConfiguration implements DeviceConfig.OnPropertiesChangedLi @Override public void onPropertiesChanged(@NonNull DeviceConfig.Properties properties) { // TODO(b/263349751): Update flag and default value to true if (properties.getKeyset().contains(KEY_ENABLE_LETTERBOX_RESTART_DIALOG)) { mIsLetterboxRestartDialogAllowed = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_RESTART_DIALOG, false); DEFAULT_VALUE_ENABLE_LETTERBOX_RESTART_DIALOG); } // TODO(b/263349751): Update flag and default value to true if (properties.getKeyset().contains(KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION)) { mIsLetterboxReachabilityEducationAllowed = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_WINDOW_MANAGER, KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION, false); KEY_ENABLE_LETTERBOX_REACHABILITY_EDUCATION, DEFAULT_VALUE_ENABLE_LETTERBOX_REACHABILITY_EDUCATION); } } Loading