Retry: JobScheduler to use UID active state for job exemption

This is a second try for I134ac3d84a26309dab56ab6cbb271de626acdf7d.

Apparently alarms are firing even before PHASE_SYSTEM_SERVICES_READY, so add
more null checks.

Test: Boot on taimen.
Test: atest CtsAlarmManagerTestCases
Test: atest CtsJobSchedulerTestCases
Test: atest CtsBatterySavingTestCases
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/AppStateTrackerTest.java
Change-Id: I4b2a5af04e4d78c996e73da0621047da7a7bff39
This commit is contained in:
Makoto Onuki
2018-02-07 10:49:01 -08:00
parent bcaeb104c2
commit 3f7be62d31
9 changed files with 192 additions and 119 deletions

View File

@@ -348,4 +348,9 @@ public abstract class ActivityManagerInternal {
* Returns is the caller has the same uid as the Recents component
*/
public abstract boolean isCallerRecents(int callingUid);
/**
* Whether an UID is active or idle.
*/
public abstract boolean isUidActive(int uid);
}