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

Commit e1814b71 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "JobConcurrencyManager: fix the NPE problem." into main am: 32bb5712 am: c7a288da

parents b41923ba c7a288da
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1034,7 +1034,7 @@ class JobConcurrencyManager {
                for (int p = preferredUidOnly.size() - 1; p >= 0; --p) {
                    final ContextAssignment assignment = preferredUidOnly.get(p);
                    final JobStatus runningJob = assignment.context.getRunningJobLocked();
                    if (runningJob.getUid() != nextPending.getUid()) {
                    if (runningJob == null || runningJob.getUid() != nextPending.getUid()) {
                        continue;
                    }
                    final int jobBias = mService.evaluateJobBiasLocked(runningJob);
@@ -1916,8 +1916,9 @@ class JobConcurrencyManager {
        for (int i = 0; i < mActiveServices.size(); i++) {
            final JobServiceContext jc = mActiveServices.get(i);
            final JobStatus js = jc.getRunningJobLocked();
            if (jc.stopIfExecutingLocked(pkgName, userId, namespace, matchJobId, jobId,
                    stopReason, internalStopReason)) {
            if (js != null &&
                    jc.stopIfExecutingLocked(pkgName, userId, namespace,
                        matchJobId, jobId, stopReason, internalStopReason)) {
                foundSome = true;
                pw.print("Stopping job: ");
                js.printUniqueId(pw);