Loading apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -434,7 +434,7 @@ public final class ConnectivityController extends RestrictingController implemen final UidStats uidStats = final UidStats uidStats = getUidStats(jobStatus.getSourceUid(), jobStatus.getSourcePackageName(), true); getUidStats(jobStatus.getSourceUid(), jobStatus.getSourcePackageName(), true); if (jobStatus.shouldTreatAsExpeditedJob() && jobStatus.shouldTreatAsUserInitiatedJob()) { if (jobStatus.shouldTreatAsExpeditedJob() || jobStatus.shouldTreatAsUserInitiatedJob()) { if (!jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) { if (!jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) { // Don't request a direct hole through any of the firewalls. Instead, mark the // Don't request a direct hole through any of the firewalls. Instead, mark the // constraint as satisfied if the network is available, and the job will get // constraint as satisfied if the network is available, and the job will get Loading @@ -444,7 +444,9 @@ public final class ConnectivityController extends RestrictingController implemen } } // Don't need to update constraint here if the network goes away. We'll do that as part // Don't need to update constraint here if the network goes away. We'll do that as part // of regular processing when we're notified about the drop. // of regular processing when we're notified about the drop. } else if (jobStatus.isRequestedExpeditedJob() } else if (((jobStatus.isRequestedExpeditedJob() && !jobStatus.shouldTreatAsExpeditedJob()) || (jobStatus.getJob().isUserInitiated() && !jobStatus.shouldTreatAsUserInitiatedJob())) && jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) { && jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) { // Make sure we don't accidentally keep the constraint as satisfied if the job went // Make sure we don't accidentally keep the constraint as satisfied if the job went // from being expedited-ready to not-expeditable. // from being expedited-ready to not-expeditable. Loading Loading
apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -434,7 +434,7 @@ public final class ConnectivityController extends RestrictingController implemen final UidStats uidStats = final UidStats uidStats = getUidStats(jobStatus.getSourceUid(), jobStatus.getSourcePackageName(), true); getUidStats(jobStatus.getSourceUid(), jobStatus.getSourcePackageName(), true); if (jobStatus.shouldTreatAsExpeditedJob() && jobStatus.shouldTreatAsUserInitiatedJob()) { if (jobStatus.shouldTreatAsExpeditedJob() || jobStatus.shouldTreatAsUserInitiatedJob()) { if (!jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) { if (!jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) { // Don't request a direct hole through any of the firewalls. Instead, mark the // Don't request a direct hole through any of the firewalls. Instead, mark the // constraint as satisfied if the network is available, and the job will get // constraint as satisfied if the network is available, and the job will get Loading @@ -444,7 +444,9 @@ public final class ConnectivityController extends RestrictingController implemen } } // Don't need to update constraint here if the network goes away. We'll do that as part // Don't need to update constraint here if the network goes away. We'll do that as part // of regular processing when we're notified about the drop. // of regular processing when we're notified about the drop. } else if (jobStatus.isRequestedExpeditedJob() } else if (((jobStatus.isRequestedExpeditedJob() && !jobStatus.shouldTreatAsExpeditedJob()) || (jobStatus.getJob().isUserInitiated() && !jobStatus.shouldTreatAsUserInitiatedJob())) && jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) { && jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) { // Make sure we don't accidentally keep the constraint as satisfied if the job went // Make sure we don't accidentally keep the constraint as satisfied if the job went // from being expedited-ready to not-expeditable. // from being expedited-ready to not-expeditable. Loading