+314
−0
File changed.
Preview size limit exceeded, changes collapsed.
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Introducing a new app op which controls whether apps are allowed to run jobs in the background. When the app op mode is set to ignored, jobs will be delayed until the app is in the foreground. The same semantics as background check for O apps will apply, which means power whitelisted apps can still run jobs freely and apps will have some settle time after going to background after which their jobs will be stopped. Test: Added AppOpsUpgradeTest for upgrading appops to inherit existing value of OP_RUN_ANY_IN_BACKGROUND from OP_RUN_IN_BACKGROUND Added backgroundRestrictionsTest for background jobs. To run the test: mmm -j32 services/tests/servicestests/ adb install -r \ out/target/product/marlin/data/app/JobTestApp/JobTestApp.apk adb install -r \ out/target/product/marlin/data/app/FrameworksServicesTests/FrameworksServicesTests.apk adb shell am instrument -e class 'com.android.server.job.BackgroundRestrictionsTest' -w 'com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner' Bug: 63001625 Change-Id: I6eb01adb6cd2c1d0e7be4f7eca960f57ad9581bf
File changed.
Preview size limit exceeded, changes collapsed.