[dev_option] Update 'Desktop mode on secondary toggle' to be

'Freeform windows on secondary diplay'.

Make sure the toggles enables freeform support on devices. This remove
reliance on 'Enable freeform windows suppport' toggle when using this
toggle.

Also update strings for all toggles to just use term 'freeform windows'
instead of 'desktop mode' or 'freeform windowing experiences'.

Two toggles have the same name 'enable freeform windows', but users will
see only one of them at a time.

Test: Added new tests
Bug: 348193756
Bug: 348186127
Flag: EXEMPT minor change
Change-Id: Ic4528618e6902d084c58a6b5ddeb4b92d63386d6
This commit is contained in:
Alina Zaidi
2024-07-25 15:59:35 +00:00
parent d0333eb674
commit e85695f88c
3 changed files with 44 additions and 15 deletions

View File

@@ -67,6 +67,12 @@ public class DesktopModeSecondaryDisplayPreferenceController extends
Settings.Global.putInt(mContext.getContentResolver(),
DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS,
isEnabled ? SETTING_VALUE_ON : SETTING_VALUE_OFF);
// Update freeform window support on device.
// DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT setting enables freeform support on device
// where it's not present by default.
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT,
isEnabled ? SETTING_VALUE_ON : SETTING_VALUE_OFF);
if (isEnabled && mFragment != null) {
RebootConfirmationDialogFragment.show(
mFragment, R.string.reboot_dialog_enable_desktop_mode_on_secondary_display,