By default if a RestrictedPreference is restricted then the preference
becomes disabled but still visible. But for brightness preferences in
A11y SUW we'd like to hide them if they're restricted and disabled,
since it's meaningless to show disabled items in SUW.
To achieve this, in PreferenceController#displayPreference we check the
whether the preference is RestrictedPreference and restricted, so we can
decide whether to hide it. Besides, if the preference is restricted and
we hide it, in PreferenceController#getAvailableStatis we also return
CONDITIONALLY_UNAVAILABLE to make consistency.
Bug: 384620216
Flag: com.android.settings.accessibility.add_brightness_settings_in_suw
Test: manually
atest AutoBrightnessPreferenceControllerForSetupWizardTest
atest BrightnessLevelPreferenceControllerForSetupWizardTest
Change-Id: Ifb68b4d64fc111d91a23457882a006002173d232
This is to address the API council feedback
Bug: 379313664
Flag: EXEMPT minor change
Test: EXEMPT minor change
Change-Id: I9f9126b2e9eae3311f9d03d13d201d7518a27a09
As the preference is exported as external settings, for safety, do not
update the preference key with datastore key. As a workaround, manage a
mapping between preference hierarchy key and datastore key.
Bug: 372307567
Flag: com.android.settings.flags.catalyst_lockscreen_from_display_settings
Test: devtool
Change-Id: I56126485061859b41216cd23b8e1caf63823a1ec
Change the signature from metadata to preference key, so that the API
could be used to notify other preferences on the same screen.
NO_IFTTT=Catalyst only
Bug: 332201912
Flag: com.android.settings.flags.catalyst
Test: atest
Change-Id: Ibdf5f9004471d5491a0be1e84365cbe9f136c373
Revert submission 30375632-revert-30294757-catalyst_battery_percentage-RPJNJOPEZI
Reason for revert: the failures is part of the robolectric issue b/378822459. Tested locally that the change is not breaking ClockworkSetupWizardRoboTests.
Reverted changes: /q/submissionid:30375632-revert-30294757-catalyst_battery_percentage-RPJNJOPEZI
Change-Id: I2210002924650cb54c55a41be25d97a3997c065e
Revert submission 30294757-catalyst_battery_percentage
Reason for revert: <Potential culprit for b/378858348 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>
Reverted changes: /q/submissionid:30294757-catalyst_battery_percentage
Change-Id: I17a124619a1d6c7b6930a1c26c2b84c1a52ce8f7
Based on the UX alignment in doc and figma, we remove the autobrightness
detailed page to make the consistency with other Vision settings, and
update the brightness preference icons and summaries.
Bug: 377289685
Flag: com.android.settings.accessibility.add_brightness_settings_in_suw
Test: manually
Change-Id: If4038de07dec7eeb38d3c057affba737849e23c9
Migrate the AutoBrightnessPreferenceController to be a Catalyst type preference.
Test: atest AutoBrightnessScreenTest
Bug: 374712065
Flag: com.android.settings.flags.catalyst_screen_brightness_mode
Change-Id: I80d17a4f7fae237825ab84d1f428614affcb9065
Add the skeleton of the DisplayScreen
Test: atest DisplayScreenTest
Bug: 368359268
Flag: com.android.settings.flags.catalyst_display_settings_screen
Change-Id: I806504ae839ba0a53320fd94fb4fe21a52dc249b
The AccessibilitySettingsForSetupWizard class should not be responsible for managing the initial
logic of controllers, such as determining which controllers need to be dynamically added or updated
using setInSetupWizard APIs. This logic should be handled directly by the controllers themselves.
Bug: 311093618
Flag: EXEMPT bugfix
Test: atest AccessibilitySettingsForSetupWizardTest
AutoBrightnessPreferenceControllerForSetupWizardTest
AutoBrightnessPreferenceControllerTest
BrightnessLevelPreferenceControllerForSetupWizardTest
BrightnessLevelPreferenceControllerTest
Change-Id: I6065a10e72d002981c0f514543e6933d79c2aa1b
The main reason for this problem is that someone forgot to super's updateState() to update the ui, so the internal status was updated but ui status was not. For now since updateStateInternal() did nothing substantive, it is suggested to remove this override to fix.
Bug: b/241957450 b/255902043
Test: manually tap button according to bug report.
Change-Id: I80d1173986a9f22c4a77c8c13011292c08f8dc2e
Bedtime is no longer a special case.
Fixes: 361592187
Test: atest com.android.settings.display.darkmode
Flag: android.app.modes_ui
Change-Id: Iddc5d8142d6bc0bb1f5c4ead876ee201c8818b12