Commit Graph

10 Commits

Author SHA1 Message Date
Pierre Barbier de Reuille
8a42cd7171 Add the new Desktop Experience dev options
This option, when available, replaces the enable freeform ones.

Bug: 390625230
Bug: 389092752
Test: atest DesktopExperiencePreferenceControllerTest
Test: atest DesktopModeSecondaryDisplayPreferenceControllerTest
Test: atest DesktopModePreferenceControllerTest
Test: atest FreeformWindowsPreferenceControllerTest
Flag: com.android.window.flags.show_desktop_experience_dev_option
Change-Id: Ib2eaa99fab1fbcae6ed9afa997cfe92676a75c70
2025-01-23 11:01:11 +00:00
Alina Zaidi
cc3eac9b7c [dev_option] Move DestopModeFlags out of android.windows.flags
This is to maintain separation of non-generated files from generated flag values.

Test: Current tests pass
Flag: EXEMPT refactoring
Bug: 370777204
Change-Id: I6588ebec59519b4e0d6c83057b8106c20a3df8fa
2024-10-01 18:29:14 +00:00
Alina Zaidi
76bbdd58ab [dev_option] Use DesktopModeFlags from core instead of Shell
Test: Current tests pass
Bug: 368055148
Flag: EXEMPT refactoring
Change-Id: I5f40bd1e00c0fdddfdeefc886e691c9b732387b8
2024-09-19 10:05:02 +00:00
Alina Zaidi
b456e84570 [Dev option] Use DesktopModeStatus and ToggleOverride from wm/shell in Settings DesktopModePreferenceController
Test: Added tests
Bug: 348193756
Flag: com.android.window.flags.show_desktop_windowing_dev_option
Change-Id: I0dc3c62df992a2454bd7c1fc239302489107ae59
2024-07-08 16:07:43 +00:00
Alina Zaidi
d98058c4b7 [Dev option] Add a dev option to enable DW.
Default value of this dev options solely depends on
enable_desktop_windowing_mode, which is intended

Toggle is shown only if DW is eligible on device

Currently this option only overrides features guarded by
enable_desktop_windowing_mode, later on it will be used to override a
few other DW features

Test: Added tests. Locally tested CUJs
Bug: 348186127
Bug: 348193756
Flag: com.android.window.flags.show_desktop_windowing_dev_option

Change-Id: I1c1f946b586a5ca0440b29879925ba1a624717aa
2024-07-01 17:23:20 +00:00
Chris Antol
1b8c0fdfdb Annotate Nullability for DevSettings fragment usage
Bug: 319310316
Change-Id: I4f2d219b818971e222346fc630c358b1d8b84ae9
Test: None
2024-06-11 19:45:38 +00:00
Chaohui Wang
15ca95a31b Migrate to TwoStatePreference
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference.

Using TwoStatePreference in Java will helps migration in the future.

Bug: 306771414
Test: manual - check Settings pages
Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
2023-10-23 09:28:57 +00:00
Yuxin Hu
25b270c0f8 Add developer option switch to set ANGLE as the default system driver
This change adds a new developer option switch called
"Enable ANGLE". It defaults to off. User can choose
to toggle it on and off, and the value of the system
property "persist.graphics.egl" is changed accordingly:

switch off: persist.graphics.egl=""
switch on: persist.graphics.egl="angle"

When user toggles the switch, a reboot window is
popped up asking user to reboot now to make the change
takes effect. If user chooses to cancel the reboot,
the switch is toggled back. This enforces that a reboot
is required whenever the "persis.graphics.egl" value
changes.

Upon reboot, we will load either ANGLE or native
GLES driver as the system driver, based on the value of
"persist.graphics.egl".

The switch is disabled if ANGLE is not installed
in /vendor partition. We use the system property
"ro.gfx.angle.supported" as an indicator. We set the
two conditions together in angle.mk file. Any device
mk file that inherits angle.mk file will result in
ANGLE libs installed in /vendor and "ro.gfx.angle.supported"
set to true.

Bug: b/270994705
Test: m; flash and check Pixel 7 boots fine
atest SettingsRoboTests:GraphicsDriverEnableAngleAsSystemDriverControllerTest

Change-Id: I565eff614472bb6ba50742e7dfa49b50dca2809f
2023-04-28 18:42:10 +00:00
Garfield Tan
7a380f3dc6 Ask user to reboot when enabling freeform and desktop mode
The introduction of FreeformTaskListener in WM shell requires a reboot
after enabling freeform support fully. Let's add a dialog explaining the
requirement and ask user to reboot the device.

Enabling desktop mode also requires a reboot to take effect, so this CL
also adds the support to it.

There is also a cancel button to dismiss the dialog without a reboot,
just in case users need to hold off the reboot for any reason.

Bug: 215437867
Test: Pressing OK reboots the device. Pressing Cancel dismisses the
dialog.
Test: atest SettingsRoboTests:FreeformWindowsPreferenceControllerTest
Test: atest SettingsRoboTests:DesktopModePreferenceControllerTest

Change-Id: I553237a29751f73afa9fd4066241a19740872f6f
2022-01-24 21:19:46 -08:00
Andrii Kulian
8e3859bc5a Add dev option to force desktop mode
Bug: 112451761
Test: DesktopModePreferenceControllerTest
Test: FreeformWindowsPreferenceControllerTest
Change-Id: I7df995d1bd8731b813cfa0c72c4dc6d35973e939
2018-11-07 13:57:03 -08:00