Commit Graph

3 Commits

Author SHA1 Message Date
Darrell Shi
542644e83f Change screensaver ctrlr to base pref ctrlr.
This change makes it that the ScreenSaverPreferenceController extends
BasePreferenceController so that it can be readily used and pointed to
from an xml file.

Bug: 261627295
Test: atest ScreenSaverPreferenceControllerTest

Change-Id: I95487f2f49a23422fff46f30b0cfa287582a547b
2022-12-16 16:49:54 +00:00
Adam Bookatz
e5e232428d Introduce concept of DockUser
Dreams and docking often refers to "user zero" or "system user".
But more generally, the special user for dreams or switching-to-on-docking
need not be user 0, and in fact won't be in certain modes. So this needs updating.

Test: the files mentioned in the topic
Bug: 257333623
Change-Id: If068aa79a770bed4abf3f7ca1859a95cd1eb4ecd
Merged-In: If068aa79a770bed4abf3f7ca1859a95cd1eb4ecd
2022-11-14 19:19:21 +00:00
Will
640247eb58 Disable screen saver setting for non-system users.
On devices where non-system users are not allowed to dream, disable the
screen saver setting when the current user is not the system user.

Bug: 213906883
Test: atest ScreenSaverPreferenceControllerTest
Test: Manually with the following steps:
Step 1: On a device with the config setting
config_dreamsOnlyEnabledForSystemUser set to false, make sure that
non-system users can still access the screen saver setting.
Step 2: On a device with the config setting
config_dreamsOnlyEnabledForSystemUser setting is set to true, make sure
that non-system users can not access (or see) the screen saver setting.
Step 3: Make sure that system users can still see the screen saver
setting on a device where config_dreamsOnlyEnabledForSystemUser is set
to true.

Change-Id: I7e167ed5a1ea183c725ba89a57b8d0b372064b82
2022-04-22 16:03:31 -07:00