Merge "[dev_option] Update 'Desktop mode on secondary toggle' to be 'Freeform windows on secondary diplay'." into main

This commit is contained in:
Alina Zaidi
2024-07-29 17:49:54 +00:00
committed by Android (Google) Code Review
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,