Loading apex/jobscheduler/framework/java/android/app/job/JobInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -1703,7 +1703,7 @@ public class JobInfo implements Parcelable { throw new IllegalArgumentException("An expedited job cannot be periodic"); } if ((constraintFlags & ~CONSTRAINT_FLAG_STORAGE_NOT_LOW) != 0 || (flags & ~FLAG_EXPEDITED) != 0) { || (flags & ~(FLAG_EXPEDITED | FLAG_EXEMPT_FROM_APP_STANDBY)) != 0) { throw new IllegalArgumentException( "An expedited job can only have network and storage-not-low constraints"); } Loading services/core/java/com/android/server/content/SyncManager.java +4 −5 Original line number Diff line number Diff line Loading @@ -1478,13 +1478,12 @@ public class SyncManager { + logSafe(syncOperation.target)); backoff = new Pair<Long, Long>(SyncStorageEngine.NOT_IN_BACKOFF_MODE, SyncStorageEngine.NOT_IN_BACKOFF_MODE); } else { } else if (backoff.first != SyncStorageEngine.NOT_IN_BACKOFF_MODE) { // if an EJ is being backed-off but doesn't have SYNC_EXTRAS_IGNORE_BACKOFF set, // reschedule it as a regular job if (syncOperation.isScheduledAsExpeditedJob()) { // reschedule it as a regular job. Immediately downgrade here in case minDelay is // set to 0. syncOperation.scheduleEjAsRegularJob = true; } } long now = SystemClock.elapsedRealtime(); long backoffDelay = backoff.first == SyncStorageEngine.NOT_IN_BACKOFF_MODE ? 0 : backoff.first - now; Loading services/core/java/com/android/server/content/SyncOperation.java +2 −0 Original line number Diff line number Diff line Loading @@ -258,6 +258,7 @@ public class SyncOperation { jobInfoExtras.putLong("expectedRuntime", expectedRuntime); jobInfoExtras.putInt("retries", retries); jobInfoExtras.putInt("syncExemptionFlag", syncExemptionFlag); jobInfoExtras.putBoolean("ejDowngradedToRegular", scheduleEjAsRegularJob); return jobInfoExtras; } Loading Loading @@ -325,6 +326,7 @@ public class SyncOperation { op.jobId = jobExtras.getInt("jobId"); op.expectedRuntime = jobExtras.getLong("expectedRuntime"); op.retries = jobExtras.getInt("retries"); op.scheduleEjAsRegularJob = jobExtras.getBoolean("ejDowngradedToRegular"); return op; } Loading Loading
apex/jobscheduler/framework/java/android/app/job/JobInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -1703,7 +1703,7 @@ public class JobInfo implements Parcelable { throw new IllegalArgumentException("An expedited job cannot be periodic"); } if ((constraintFlags & ~CONSTRAINT_FLAG_STORAGE_NOT_LOW) != 0 || (flags & ~FLAG_EXPEDITED) != 0) { || (flags & ~(FLAG_EXPEDITED | FLAG_EXEMPT_FROM_APP_STANDBY)) != 0) { throw new IllegalArgumentException( "An expedited job can only have network and storage-not-low constraints"); } Loading
services/core/java/com/android/server/content/SyncManager.java +4 −5 Original line number Diff line number Diff line Loading @@ -1478,13 +1478,12 @@ public class SyncManager { + logSafe(syncOperation.target)); backoff = new Pair<Long, Long>(SyncStorageEngine.NOT_IN_BACKOFF_MODE, SyncStorageEngine.NOT_IN_BACKOFF_MODE); } else { } else if (backoff.first != SyncStorageEngine.NOT_IN_BACKOFF_MODE) { // if an EJ is being backed-off but doesn't have SYNC_EXTRAS_IGNORE_BACKOFF set, // reschedule it as a regular job if (syncOperation.isScheduledAsExpeditedJob()) { // reschedule it as a regular job. Immediately downgrade here in case minDelay is // set to 0. syncOperation.scheduleEjAsRegularJob = true; } } long now = SystemClock.elapsedRealtime(); long backoffDelay = backoff.first == SyncStorageEngine.NOT_IN_BACKOFF_MODE ? 0 : backoff.first - now; Loading
services/core/java/com/android/server/content/SyncOperation.java +2 −0 Original line number Diff line number Diff line Loading @@ -258,6 +258,7 @@ public class SyncOperation { jobInfoExtras.putLong("expectedRuntime", expectedRuntime); jobInfoExtras.putInt("retries", retries); jobInfoExtras.putInt("syncExemptionFlag", syncExemptionFlag); jobInfoExtras.putBoolean("ejDowngradedToRegular", scheduleEjAsRegularJob); return jobInfoExtras; } Loading Loading @@ -325,6 +326,7 @@ public class SyncOperation { op.jobId = jobExtras.getInt("jobId"); op.expectedRuntime = jobExtras.getLong("expectedRuntime"); op.retries = jobExtras.getInt("retries"); op.scheduleEjAsRegularJob = jobExtras.getBoolean("ejDowngradedToRegular"); return op; } Loading