Merge "Fix conditionals."
This commit is contained in:
committed by
Android (Google) Code Review
commit
bb3a7106f8
@@ -434,7 +434,7 @@ public final class ConnectivityController extends RestrictingController implemen
|
||||
final UidStats uidStats =
|
||||
getUidStats(jobStatus.getSourceUid(), jobStatus.getSourcePackageName(), true);
|
||||
|
||||
if (jobStatus.shouldTreatAsExpeditedJob() && jobStatus.shouldTreatAsUserInitiatedJob()) {
|
||||
if (jobStatus.shouldTreatAsExpeditedJob() || jobStatus.shouldTreatAsUserInitiatedJob()) {
|
||||
if (!jobStatus.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)) {
|
||||
// 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
|
||||
@@ -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
|
||||
// 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)) {
|
||||
// Make sure we don't accidentally keep the constraint as satisfied if the job went
|
||||
// from being expedited-ready to not-expeditable.
|
||||
|
||||
Reference in New Issue
Block a user