Loading apex/jobscheduler/service/java/com/android/server/job/controllers/BackgroundJobsController.java +1 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ public final class BackgroundJobsController extends StateController { isActive = (activeState == KNOWN_ACTIVE); } if (isActive && jobStatus.getStandbyBucket() == NEVER_INDEX) { Slog.wtf(TAG, "App " + packageName + " became active but still in NEVER bucket"); jobStatus.maybeLogBucketMismatch(); } boolean didChange = jobStatus.setBackgroundNotRestrictedConstraintSatisfied(canRun); didChange |= jobStatus.setUidActive(isActive); Loading apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java +17 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,11 @@ public final class JobStatus { */ private int standbyBucket; /** * Whether we've logged an error due to standby bucket mismatch with active uid state. */ private boolean mLoggedBucketMismatch; /** * Debugging: timestamp if we ever defer this job based on standby bucketing, this * is when we did so. Loading Loading @@ -805,6 +810,18 @@ public final class JobStatus { } standbyBucket = newBucket; mLoggedBucketMismatch = false; } /** * Log a bucket mismatch if this is the first time for this job. */ public void maybeLogBucketMismatch() { if (!mLoggedBucketMismatch) { Slog.wtf(TAG, "App " + getSourcePackageName() + " became active but still in NEVER bucket"); mLoggedBucketMismatch = true; } } // Called only by the standby monitoring code Loading Loading
apex/jobscheduler/service/java/com/android/server/job/controllers/BackgroundJobsController.java +1 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ public final class BackgroundJobsController extends StateController { isActive = (activeState == KNOWN_ACTIVE); } if (isActive && jobStatus.getStandbyBucket() == NEVER_INDEX) { Slog.wtf(TAG, "App " + packageName + " became active but still in NEVER bucket"); jobStatus.maybeLogBucketMismatch(); } boolean didChange = jobStatus.setBackgroundNotRestrictedConstraintSatisfied(canRun); didChange |= jobStatus.setUidActive(isActive); Loading
apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java +17 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,11 @@ public final class JobStatus { */ private int standbyBucket; /** * Whether we've logged an error due to standby bucket mismatch with active uid state. */ private boolean mLoggedBucketMismatch; /** * Debugging: timestamp if we ever defer this job based on standby bucketing, this * is when we did so. Loading Loading @@ -805,6 +810,18 @@ public final class JobStatus { } standbyBucket = newBucket; mLoggedBucketMismatch = false; } /** * Log a bucket mismatch if this is the first time for this job. */ public void maybeLogBucketMismatch() { if (!mLoggedBucketMismatch) { Slog.wtf(TAG, "App " + getSourcePackageName() + " became active but still in NEVER bucket"); mLoggedBucketMismatch = true; } } // Called only by the standby monitoring code Loading