Loading services/core/java/com/android/server/job/JobSchedulerService.java +20 −7 Original line number Diff line number Diff line Loading @@ -1721,7 +1721,14 @@ public final class JobSchedulerService extends com.android.server.SystemService // If the app is in a non-active standby bucket, make sure we've waited // an appropriate amount of time since the last invocation if (mHeartbeat < mNextBucketHeartbeat[job.getStandbyBucket()]) { final int bucket = job.getStandbyBucket(); if (mHeartbeat < mNextBucketHeartbeat[bucket]) { // Only skip this job if it's still waiting for the end of its (initial) nominal // bucket interval. Once it's waited that long, we let it go ahead and clear. // The final (NEVER) bucket is special; we never age those apps' jobs into // runnability. if (bucket >= mConstants.STANDBY_BEATS.length || (mHeartbeat < job.getBaseHeartbeat() + mConstants.STANDBY_BEATS[bucket])) { // TODO: log/trace that we're deferring the job due to bucketing if we hit this if (job.getWhenStandbyDeferred() == 0) { if (DEBUG_STANDBY) { Loading @@ -1731,6 +1738,12 @@ public final class JobSchedulerService extends com.android.server.SystemService job.setWhenStandbyDeferred(sElapsedRealtimeClock.millis()); } return false; } else { if (DEBUG_STANDBY) { Slog.v(TAG, "Bucket deferred job aged into runnability at " + mHeartbeat + " : " + job); } } } // The expensive check last: validate that the defined package+service is Loading Loading
services/core/java/com/android/server/job/JobSchedulerService.java +20 −7 Original line number Diff line number Diff line Loading @@ -1721,7 +1721,14 @@ public final class JobSchedulerService extends com.android.server.SystemService // If the app is in a non-active standby bucket, make sure we've waited // an appropriate amount of time since the last invocation if (mHeartbeat < mNextBucketHeartbeat[job.getStandbyBucket()]) { final int bucket = job.getStandbyBucket(); if (mHeartbeat < mNextBucketHeartbeat[bucket]) { // Only skip this job if it's still waiting for the end of its (initial) nominal // bucket interval. Once it's waited that long, we let it go ahead and clear. // The final (NEVER) bucket is special; we never age those apps' jobs into // runnability. if (bucket >= mConstants.STANDBY_BEATS.length || (mHeartbeat < job.getBaseHeartbeat() + mConstants.STANDBY_BEATS[bucket])) { // TODO: log/trace that we're deferring the job due to bucketing if we hit this if (job.getWhenStandbyDeferred() == 0) { if (DEBUG_STANDBY) { Loading @@ -1731,6 +1738,12 @@ public final class JobSchedulerService extends com.android.server.SystemService job.setWhenStandbyDeferred(sElapsedRealtimeClock.millis()); } return false; } else { if (DEBUG_STANDBY) { Slog.v(TAG, "Bucket deferred job aged into runnability at " + mHeartbeat + " : " + job); } } } // The expensive check last: validate that the defined package+service is Loading