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

Commit ccc63ec8 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Work on issue #62095840: NPE in JobParamteres in the background

Crash early if an app calls jobFinished() with null params.

Test: manual

Change-Id: Icc2cf241edaad00bc5bd49d07a431627bbd76524
parent 7ddf5421
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -210,6 +210,9 @@ public abstract class JobServiceEngine {
     * information.
     */
    public void jobFinished(JobParameters params, boolean needsReschedule) {
        if (params == null) {
            throw new NullPointerException("params");
        }
        Message m = Message.obtain(mHandler, MSG_JOB_FINISHED, params);
        m.arg2 = needsReschedule ? 1 : 0;
        m.sendToTarget();