Commit Graph

741 Commits

Author SHA1 Message Date
Jacky Wang
eb37f169a3 Merge "[Catalyst] Support Getter API for settings service" into main 2024-11-17 05:53:58 +00:00
Jacky Wang
e635f1e0ed [Catalyst] Support Getter API for settings service
NO_IFTTT=Catalyst only

Bug: 373895596
Flag: com.android.settings.flags.catalyst_service
Test: devtool
Change-Id: I367f350d2192d1285bf355a9e45c2d9bec11fa44
2024-11-16 08:06:28 +08:00
Jacky Wang
dec8370d25 [Catalyst] Migrate "Screen attention"
Bug: 368359967
Flag: com.android.settings.flags.catalyst_screen_timeout
Test: devtool
Change-Id: I3c990e8cb6d1414395408b884616574cd6130f81
2024-11-16 03:42:57 +08:00
Jacky Wang
e6ef4c2443 [Catalyst] Add initial ScreenTimeoutScreen
Bug: 368359967
Flag: com.android.settings.flags.catalyst_screen_timeout
Test: atest
Change-Id: I13d23e4e5164c3dd4a4a01b00b854642f748b020
2024-11-16 03:42:47 +08:00
Jacky Wang
8d3be11418 Refactor duplicate isAdaptiveSleepSupported
Bug: 368359967
Flag: EXEMPT refactor
Test: atest
Change-Id: I41d465f67fb50e83d9bd23af54597afb6bd467cf
2024-11-16 01:49:52 +08:00
Fan Wu
14ba0b6571 Merge "Revert "Revert "Migrate Battery percentage preference into catal..."" into main 2024-11-14 03:24:54 +00:00
Fan Wu
a794e01d45 Revert "Revert "Migrate Battery percentage preference into catal..."
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
2024-11-14 01:59:16 +00:00
ELIYAZ MOMIN (xWF)
2bd5ef25bd Merge "Revert "Migrate Battery percentage preference into catalyst. Ref..."" into main 2024-11-13 15:16:23 +00:00
ELIYAZ MOMIN (xWF)
1bbe798c8f Revert "Migrate Battery percentage preference into catalyst. Ref..."
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
2024-11-13 13:39:43 +00:00
Roy Chou
04715ae017 Merge "feat(brightness suw): adjust brightness toggles UI and remove autobrightness standalone page" into main 2024-11-13 08:22:07 +00:00
Fan Wu
c2f72f3cea Migrate Battery percentage preference into catalyst. Refactor logic from BatteryPercentagePreferenceController to BatteryPercentageSwitchPreference
Bug: 372774754
Test: atest and manual test
Flag: com.android.settings.flags.catalyst_power_usage_summary_screen
NO_IFTTT=already updated.

Change-Id: I9a259b966a832293e067c9f06c4c98479cb538a2
2024-11-13 01:28:02 +00:00
Jacky Wang
865e9b29f5 [Catalyst] Support multiple restriction keys
NO_IFTTT=Catalyst only

Bug: 377600992
Flag: com.android.settings.flags.catalyst
Test: testdpc
Change-Id: If7212b5402f7e271b7fdbd2a43bed0e11ee6f15f
2024-11-12 13:19:16 +08:00
Sunny Shao
5642811b6e Refine some preference name
Test: atest DisplayScreenTest
Bug: 368359268
Flag: com.android.settings.flags.catalyst_display_settings_screen
Change-Id: I73ed10a3a0bee2dc91a0a4247fb08842db70a2d4
2024-11-11 14:03:45 +08:00
Rupesh Bansal
24f961a07a Changed to use the new hidden API.
Bug: 372700957
Test: refactoring
Flag: EXEMPT Refactoring
Change-Id: I5eb7d5ab94ebd273aea9226cd3cbed5de0d49baa
2024-11-06 18:11:40 +00:00
Jacky Wang
33c580ec45 [Catalyst] Support restriction for Display settings
NO_IFTTT=Catalyst only

Bug: 377600992
Flag: com.android.settings.flags.catalyst_display_settings_screen
Test: testdpc
Change-Id: I0a9a125a24614ea8d93e870891c7db6f73f4ac9e
2024-11-06 16:49:27 +08:00
Roy Chou
c2d0b25753 feat(brightness suw): adjust brightness toggles UI and remove autobrightness standalone page
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
2024-11-04 16:22:46 +00:00
Sunny Shao
f0e88a2b85 Migrate overlaid DisplayGoogleScreen
Test: atest DisplayScreenTest
Bug: 368359268
Flag: com.android.settings.flags.catalyst_display_settings_screen
Change-Id: I5c456676f02e68bcb619f2a15138536968e1be5d
2024-11-04 17:32:59 +08:00
Jacky Wang
5329552b74 [Catalyst] Allow external SET for Display/Sound settings
NO_IFTTT=Catalyst only

Bug: 360015496
Bug: 368359268
Flag: com.android.settings.flags.catalyst
Test: devtool
Change-Id: I61b2b4b78eba1ca41aa3e5cbfea41c0be9474d0b
2024-11-04 04:15:39 +08:00
Jacky Wang
45f5ef607d [Catalyst] Proivde KeyValueStore for "Adaptive brightness"
NO_IFTTT=Ignore test

Bug: 374712065
Flag: com.android.settings.flags.catalyst_screen_brightness_mode
Test: adb shell settings delete/get/put system screen_brightness_mode
Change-Id: I57b72082853493173648d4658d2f225121f68bbf
2024-11-03 21:25:41 +08:00
Sunny Shao
369263156b [Catalyst] Migrate Adaptive brightness in the DisplayScreen
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
2024-11-03 09:40:22 +08:00
Treehugger Robot
1190ef7a9f Merge "[Catalyst] Implement datastore for Smooth display" into main 2024-10-31 16:43:32 +00:00
Treehugger Robot
cf9bccdc2a Merge "[Catalyst] Migrate Brightness level" into main 2024-10-31 16:11:26 +00:00
Sunny Shao
77aa48fe0b [Catalyst] Migrate Brightness level
Test: atest DisplayScreenTest
Bug: 375895862
Flag: com.android.settings.flags.catalyst_display_settings_screen
Change-Id: Ia098e107e0e9f011db6742cc8d0ebecfc179cca6
2024-10-31 20:09:52 +08:00
Jacky Wang
f035eefe67 [Catalyst] Implement datastore for Smooth display
NO_IFTTT=Catalyst only

Bug: 374936314
Flag: com.android.settings.flags.catalyst_display_settings_screen
Test: manual & adb shell settings get/put/delete system peak_refresh_rate
Change-Id: Idc9379935934c32ef040be6c4c838e5fbb65319d
2024-10-31 09:54:20 +08:00
Jacky Wang
9332b06675 [Catalyst] Provide launch intent
Bug: 373895400
Flag: com.android.settings.flags.catalyst
Test: manual
Change-Id: If7825798c441dc0009fbd91918d4795873b39fa3
2024-10-30 20:24:18 +08:00
Sunny Shao
48a1edb12e Migrate Smooth display
Test: manual test
Bug: 374936314
Bug: 368359268
Flag: com.android.settings.flags.catalyst_display_settings_screen
Change-Id: Iaacf72751806ca64018145531dd33d510dca7f6a
2024-10-30 16:29:59 +08:00
Jacky Wang
2d1770e4f7 [Catalyst] Migrate "Dark theme" settings
Bug: 375132235
Flag: com.android.settings.flags.catalyst_dark_ui_mode
Test: Manual
Change-Id: I40f305fe8d89feac84e2316c7a90c6eeb2b4a5fa
2024-10-24 11:27:07 +08:00
Jacky Wang
45a2c3e5b8 Refactor DarkModePreference for catalyst
Bug: 375132235
Flag: EXEMPT refactor
Test: N/A
Change-Id: I17a63ad62d3b9fced4305d464372f2eab5023e3f
2024-10-24 07:54:26 +08:00
Piotr Wilczyński
ddef40edd0 Merge "Set the same density to all displays" into main 2024-10-17 15:17:59 +00:00
Jacky Wang
9b62ec9616 Provide icon for catalyst screens
Bug: 335132588
Flag: EXEMPT N/A
Test: Manual
Change-Id: I520529c3bf4a7db01889d08683f55b0efb21eae4
2024-10-17 07:38:24 +08:00
Piotr Wilczyński
2f9f582310 Set the same density to all displays
Bug: 324439718
Test: manual
Test: atest DisplaySizeDataTest
Test: atest ScreenResolutionFragmentTest
Flag: EXEMPT bugfix
Change-Id: Ibe8b15be8968545c701a872103c1c20fa698228f
2024-10-16 12:50:57 +00:00
Jacky Wang
92ce82809e [Catalyst] Use hybrid mode for display screen
Bug: 368359268
Flag: com.android.settings.flags.catalyst_display_settings_screen
Test: atest DisplayScreenTest
Change-Id: I5eed12ee5c596bee4c21c6e3aa9f3db0e0227bff
2024-10-12 16:38:31 +08:00
Sunny Shao
b31c54b6f4 Migrate DisplayScreen
Add the skeleton of the DisplayScreen

Test: atest DisplayScreenTest
Bug: 368359268
Flag: com.android.settings.flags.catalyst_display_settings_screen
Change-Id: I806504ae839ba0a53320fd94fb4fe21a52dc249b
2024-10-08 11:12:41 +08:00
Menghan Li
e0f734526d refactor(brightness suw): decouple auto brightness initialization logic for setup flow
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
2024-09-24 05:41:23 +00:00
Matías Hernández
2a3e8b3070 Update "Dark Theme" Settings screen to account for Modes that can toggle it
Bedtime is no longer a special case.

Fixes: 361592187
Test: atest com.android.settings.display.darkmode
Flag: android.app.modes_ui
Change-Id: Iddc5d8142d6bc0bb1f5c4ead876ee201c8818b12
2024-09-11 11:52:50 +02:00
Fiona Campbell
65ccea2e52 Even Dimmer for manual screen brightness mode
Bug: 338416256
Fixes: 331324279
Test: atest EvenDimmerPreferenceControllerTest

Change-Id: I039f90df1b77348cde543964905c0745c888413d
2024-06-10 11:16:31 +00:00
Roy Chou
535494eca9 Merge "feat(brightness suw): add brightness preferences in suw" into main 2024-05-15 07:25:06 +00:00
Roy Chou
042c8c7328 feat(brightness suw): add brightness preferences in suw
Add brightness level and auto brightness preference in
accessibility_settings_for_setup_wizard.xml. Since the flagging has not
be supported yet for non-Manifest resources, for now we add the
preferences by default, and update the preferece availablity status in
each preference controllers based on the flag.

Bug: 311093618
Flag: ACONFIG com.android.settings.accessibility.add_brightness_settings_in_suw DEVELOPMENT
Test: manually
      atest AccessibilitySettingsForSetupWizardTest
      atest AutoBrightnessPreferenceFragmentForSetupWizardTest
      atest AutoBrightnessPreferenceControllerTest
      atest BrightnessLevelPreferenceControllerTest
Change-Id: I350d99138bdd14bf28828a39e42f707b5b1066c1
2024-05-15 03:19:40 +00:00
marcusge
24289fa084 [Contrast] Migrate contrast settings into Display
Test: local raven device
Bug: 333905689

Change-Id: Ie94633c23ebe024b8fb48d7ffebdd7b1dfa588da
2024-05-09 06:32:29 +00:00
Fiona Campbell
8443ce8f9a Set EvenDimmer to true by default
- Read from setting with true as fallback

Bug: 336476693
Test: atest DisplayServiceTests
Test: manual up/downgrade with settings / off

Change-Id: I5279db2b35af9e84057d8f89bbbe9f26c62237c6
2024-05-07 12:29:10 +00:00
Jason Chiu
0bd014c497 [Safer intents] Settings misc
To avoid implicit intents, make intents launch explicitly.

Test: build
Bug: 323061508
Change-Id: Ie19cbceb89842a75a180898abcce81b63c18d46c
2024-03-29 04:22:45 +00:00
tomhsu
32a501562c Fix crash due to incompatible type
fix: 331182785
Test: Manual test
Change-Id: I20c150845caad1c14cad35f661c31e36def968ac
2024-03-26 05:03:16 +00:00
Treehugger Robot
333b21c6d0 Merge "Disable even dimmer setting conditionally" into main 2024-03-25 12:59:59 +00:00
Fiona Campbell
4a401d4313 Disable even dimmer setting conditionally
- Disable even dimmer settings option if autobrightness is not enabled
  on the device

Bug:179428400
Test: manual

Change-Id: I8f7add839022fc7c27694fd8daa83a608cf2736a
2024-03-23 02:09:46 +00:00
tomhsu
7465e27d85 Enforce BaseUserRestriction for DISALLOW_CONFIG_BRIGHTNESS
- For Adaptive brightness

Fix: 330855652
Test: Manual test. see b/330855652
Change-Id: Iea848c9d92abdf152d3eb827fbe1fb141f4687d7
2024-03-22 11:50:22 +00:00
Chaohui Wang
21d5f4160b Merge "Enforce BaseUserRestriction for DISALLOW_CONFIG_SCREEN_TIMEOUT" into main 2024-03-18 05:43:44 +00:00
Chaohui Wang
be49e61d0f Enforce BaseUserRestriction for DISALLOW_CONFIG_BRIGHTNESS
Fix: 329205638
Test: pm set-user-restriction --user 0 no_config_brightness 1
Change-Id: Icacf051789ea40d23cd29c16168fbeb204cf8f5b
2024-03-18 03:32:54 +00:00
Chaohui Wang
77ecdc7c04 Enforce BaseUserRestriction for DISALLOW_CONFIG_SCREEN_TIMEOUT
Fix: 329202191
Test: pm set-user-restriction --user 0 no_config_screen_timeout 1
Change-Id: Icd35365f446296fb53b1068d278d4cf5fd25939e
2024-03-12 16:22:33 +08:00
Fiona Campbell
20909fa590 Merge "Create EvenDimmerPreferenceController" into main 2024-02-26 14:28:02 +00:00
Piotr Wilczyński
96343a9eff Refresh rate preference controllers aware of multiple displays
Set mPeakRefreshRate in the preference controllers to the highest refresh rate among all the modes of all the displays. It'll then be used to determine two things:
- if the setting is available
- the summary of the setting

This should only be done if the back up smooth display feature flag is enabled. If it's disabled, mPeakRefreshRate is passed to DisplayModeDirector and used for the votes. If the highest refresh rate of one display is 120 and that of the other is 130, we shouldn't set the vote to 130 for both displays. With the flag enabled, DisplayModeDirector figures out the highest refresh rate for each display.

Bug: 310238382
Test: atest PeakRefreshRatePreferenceControllerTest
Test: atest ForcePeakRefreshRatePreferenceControllerTest
Test: atest RefreshRateSettingsUtilsTest
Change-Id: I369927ba22df70958178505d8fc7c5747aaa8fdd
2024-02-23 18:01:22 +00:00