Fix for possible NPE in JobScheduler

Fixes a possible NPE in JobScheduler

Change-Id: I4faa414ea92ab65326001f83de4624834b5ed955
This commit is contained in:
Shreyas Basarge
2016-01-15 18:24:36 +00:00
parent 4bfa55d4c2
commit 347c2780aa

View File

@@ -905,6 +905,11 @@ public class JobSchedulerService extends com.android.server.SystemService
minPriorityContextId = i;
break;
}
if (job == null) {
// No job on this context, but nextPending can't run here because
// the context has a preferred Uid.
continue;
}
if (job.getUid() != nextPending.getUid()) {
continue;
}