Commit Graph

9 Commits

Author SHA1 Message Date
Alex Johnston
2747dc6e8c Implement OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS exemption
OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS details:
* An app with this appop will be made exempt from all
  power restrictions, including app standby and doze.
* In addition, the app will be able to start fgs from
  the bg, and the user will not be able to stop fgs
  run by the app.

Changes:
* Implement the OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS

Bug: 246330879
Test: atest PowerAllowlistBackendTest

Manual testing:
- Give OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS appop to TestDPC app
- Verify the app can start fg services from the bg
- Verify fgs started by the app cannot be stopped
- Verify the app cannot be put into background restricted via Settings

Change-Id: If9e76076c59195f1e6e5f3eee3c8e7a0c754d8de
2023-02-10 13:37:38 +00:00
Edgar Wang
f480c1c3fc Update language to comply with Android's inclusive language guidance
Refactor PowerWhitelistBackend to PowerAllowlistBackend
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: I3d56e6dac1515b49a89f59c34edf403ecb891420
2020-08-04 15:47:57 +08:00
Fan Zhang
7e395e1a00 Plumb context object to PowerWhitelistBackend.
Change-Id: Ice0d037625d47f1f668b00499a7f1ad2302cc0ba
Fixes: 76435804
Test: robotests
2018-05-29 22:32:22 +00:00
Tony Mantler
bf25160090 Move PowerWhitelistBackend to SettingsLib
Bug: 70716754
Test: RunSettingsRoboTests
Change-Id: I897ce3469bb2d72a0cbe96b16b8de1a565ba4e64
2017-12-15 12:58:34 -08:00
Keith Cheung
2db5eccee4 Include work app in battery optimization settings
Fix: 23684151

Change-Id: If2d1a18838414122d8af57fda7138f87fd3f1e62
2016-04-21 14:45:37 +01:00
Zach Johnson
356fce4606 Hide apps in the battery menu that have COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED
Once they are enabled for the first time, they'll show up indefinitely.

b/22667081

Change-Id: Ia28de99d7d638d54c15fac2e08edeb70a9657e23
2015-07-24 16:46:31 -07:00
Jason Monk
6ecca51254 Don't show work apps in ignore optimizations list
The setting is global, so we only ever need one of each app.

Bug: 21847753
Change-Id: Ib04061d87b9deb81a579ad110451f2f55ec7aeff
2015-06-16 14:18:26 -04:00
Tony Mantler
67cd6ab93a Move ApplicationsState to SettingsLib
Also take InterestingConfigChanges along for the ride
and delete unused AppPermissionSettings

b/21328967

Change-Id: I4d0c1a27054845a54cf68e95a92024d2e46f636e
2015-06-08 14:41:02 -07:00
Jason Monk
1eb54eb2ff Add high power whitelist for apps
- Strings not final!
 - New UX for power usage details (more preferency)
 - Add high power apps list shows on/off and screen to
   change (when possible)
 - Link from power usage summary to high power list
 - Link from advanced apps to high power list

Bug: 19991702
Change-Id: I97c927ed82d3b89041e4429b427508545763d66c
2015-05-04 14:38:01 -04:00