Commit Graph

17 Commits

Author SHA1 Message Date
Sunny Shao
7f5e1f6e8b Customize Max Screen Timeout
Make it possible to customize the maximum screen timeout.
Added a configurable max timeout value which, if provided, will
limit the predefined timeout values.
Leverage code from aosp.

Flag: EXEMPT bugfix
Bug: 309512299
Test: atest ScreenTimeoutSettingsTest
Change-Id: Ibb180c89489fe890f1929bdefd5ced87a9566f07
2025-03-10 06:52:28 +00:00
Jan Tomljanovic
6b4c754f5e Add auth challenge for increasing screen timeout.
We only require one auth after onStart(), and only for increasing the
timeout.

Test: atest SettingsRoboTests:com.android.settings.display.ScreenTimeoutSettingsTest
Test: also manually tested
Bug: 315937886
Change-Id: If4aed67736cd7545d3a518aadd8253ea6a9fae43
2023-12-20 21:53:56 +00:00
mxyyiyi
027db802fe Add power consumption footer in screen timeout page.
- show this footer when there's no footer about work profile
Screenshots:
[without work profile]: https://screenshot.googleplex.com/5pAD2xBvP6QSBvY
[with work profile]:  https://screenshot.googleplex.com/7BRd6ToAjFN9QZx

Bug: 300245790
Test: manual
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.ScreenTimeoutSettingsTest"
Change-Id: I6df018d7758fbec3277179358b17eb11fa1aee34
2023-11-24 17:11:15 +08:00
Rex Hoffman
3c961e1c0e Setup external/robolectric for SettingsRoboTests
Current failing tests: ab/I64100010182936387
Had to Ignore some of com.android.settings.accessibility tests, which will be fixed separately

Bug: 261728063
Test: atest SettingsRoboTests -- --test-arg com.android.tradefed.testtype.IsolatedHostTest:java-flags:-XX:CompressedClassSpaceSize=3g

Change-Id: I4a0cb992db924936826e0c9808accc78dddb5f30
2023-08-17 22:33:20 +00:00
Yi Jiang
284cb1c2b2 Fixes 'learn more' link in ScreenTimeoutSettings
Bug: 227292811
Test: make RunSettingsRoboTests

Change-Id: I0e5678e6760ebd590dfd526f362207776ece3a70
2022-04-06 06:49:19 +00:00
Yi Jiang
ca6c548a67 Hides Screen Attention setting when AttentionService isn't installed.
Bug: 191696609
Test: make RunSettingsRoboTests

Change-Id: I5a38b023db91202801a8a3e975f562ddcfe6696e
2021-06-22 00:54:10 -07:00
Yi Jiang
816b1f6edc Fixes ScreenTimeoutSettingsTest
The recently added Battery Saver Preference need to be initialized in
order to avoid NPE in testing.

Bug: 188499083
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.display

Change-Id: Ib6553bcf9ed86eb46c2e0950064e34439664a1ee
2021-05-18 15:54:21 -07:00
Yi Jiang
18c97b595f Fixes 'no ripple effect' issue for screen attention setting
Preferences shouldn't be initialized at onAttach() because the settings
style hasn't been loaded yet. This change defers the preferences
initialization so that they comply with the settings style.

The change ag/14114425 is reverted due to b/186904496. This change
includes a fix for that issue.

Test: manually
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.display
Bug: 183909540
Bug: 186904496

Change-Id: I317ce251f4d11e62c6592ee587c2919da4d45db3
2021-05-03 18:02:59 -07:00
bsears
30e9ba1e52 Revert "Fixes 'no ripple effect' issue for screen attention setting"
This reverts commit 20d1da2b62.

Reason for revert: Based on bisection, this is the likely root cause of b/186904496

Bug: 186904496
Change-Id: I0eaa026b52610d7ef4543c32791531971e68f8e6
2021-05-03 17:59:11 +00:00
Yi Jiang
20d1da2b62 Fixes 'no ripple effect' issue for screen attention setting
Preferences shouldn't be initialized at onAttach() because the settings
style hasn't been loaded yet. This change defers the preferences
initialization so that they comply with the settings style.

Test: manually
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.display
Bug: 183909540

Change-Id: I4dc4503924a1dcd5b8d41f7d27e576befb11f976
2021-04-29 01:28:35 -07:00
Edgar Wang
817a167416 Apply SettingsPreferenceTheme in Settings
- Set all of preference style inherit from SettingsPreferenceTheme
- Apply to Theme.Settings and Theme.Settings.Home
- Fix robotest failed in ScreenTimeoutSettingsTest

Bug: 185206291
Test: manual & robotest
Change-Id: I855d003b10348569903855fcbf235bc00265658b
2021-04-14 16:36:14 +08:00
Abel Tesfaye
a390dc9a42 Fix for NPE in ScreenTimeoutSettingsTest
Test: make RunSettingsRoboTests -j54 ROBOTEST_FILTER=ScreenTimeoutSettings

Bug: 182149244
Change-Id: I22e15c84fa6b0864d35f79df015f1d5b86dec24b
2021-03-08 21:06:26 +00:00
Yi Jiang
bc6ec17120 Adds 'more details' hyper link.
Adds a 'more details' hyper link in the footer when options are disabled
by admin.

Test: make ROBOTEST_FILTER=ScreenTimeoutSettingsTest RunSettingsRoboTests
Bug: 180314728
Change-Id: I880ccd73f4b2ef0b695619ef42ec87559dc2b65b
2021-03-04 01:19:50 -08:00
Yi Jiang
77647ea977 Makes screen attention unsearchable on the devices that don't have the feature
Bug: 178866004
Test: make RunSettingsRoboTests
Change-Id: I8881f6b87be73b2ff75e7dfe294d2dbb75ff73d4
2021-02-02 11:55:10 -08:00
Yi Jiang
aed7559a59 Adds 'options disabled by admin' icon in timeout settings.
Bug:171257091
Test: atest ScreenTimeoutSettingsTest

Change-Id: Id0411b009a2d4dc0e4f6abf2825580ca42ad8442
2020-12-14 00:31:51 -08:00
Yi Jiang
a56be2d614 Hides Screen Attention setting on unsupported devices
Bug: 170971817
Test: make RunSettingsRoboTests
Change-Id: I8aa7882be9a1ae483e8e7500059a18859b20d42b
2020-10-29 13:16:48 -07:00
Yi Jiang
f5d1841c9d Merge Screen Attention and Screen timeout Settings.
Bug: 155051311
Test: atest
Change-Id: I6f6ee52618eab629a41b28982be32ead5f9ba08d
2020-10-13 00:47:13 -07:00