Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1825196 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Reevaluate constraints on run command." into rvc-dev am: c3e1b7dd am:...

Merge "Reevaluate constraints on run command." into rvc-dev am: c3e1b7dd am: 29c95f6e am: 8c46c222

Change-Id: I7836a8c58ebf08c8f74a9fe937642a3eae93d721
parents 9caeb404 8c46c222
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2833,6 +2833,13 @@ public class JobSchedulerService extends com.android.server.SystemService
                }

                js.overrideState = (force) ? JobStatus.OVERRIDE_FULL : JobStatus.OVERRIDE_SOFT;

                // Re-evaluate constraints after the override is set in case one of the overridden
                // constraints was preventing another constraint from thinking it needed to update.
                for (int c = mControllers.size() - 1; c >= 0; --c) {
                    mControllers.get(c).reevaluateStateLocked(uid);
                }

                if (!js.isConstraintsSatisfied()) {
                    js.overrideState = 0;
                    return JobSchedulerShellCommand.CMD_ERR_CONSTRAINTS;