Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 740b086d authored by Alex Johnston's avatar Alex Johnston
Browse files

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:
* Add DevicePolicyManager constant to exempt an app from
  power restrictions
* Link the constant with the OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS
  appop
* Implement the OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS

Bug: 246330879
Test: atest FgsManagerControllerTest
      atest ActiveServicesTest
      atest BackgroundRestrictionTest
      atest ApplicationExemptionsTest

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: I98289082dbe2a526ee66d157748c3e9e964a2a7e
parent 10e2930c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment