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

Commit d09a2bf5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Nullcheck ServiceConnector argument"

parents f4717a59 2ffea17a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.text.TextUtils;
import android.util.DebugUtils;
import android.util.Log;

import com.android.internal.util.Preconditions;
import com.android.internal.util.function.pooled.PooledLambda;

import java.io.PrintWriter;
@@ -351,7 +352,7 @@ public interface ServiceConnector<I extends IInterface> {
        @Override
        public <R> CompletionAwareJob<I, R> postForResult(@NonNull Job<I, R> job) {
            CompletionAwareJob<I, R> task = new CompletionAwareJob<>();
            task.mDelegate = job;
            task.mDelegate = Preconditions.checkNotNull(job);
            enqueue(task);
            return task;
        }
@@ -359,7 +360,7 @@ public interface ServiceConnector<I extends IInterface> {
        @Override
        public <R> AndroidFuture<R> postAsync(@NonNull Job<I, CompletableFuture<R>> job) {
            CompletionAwareJob<I, R> task = new CompletionAwareJob<>();
            task.mDelegate = (Job) job;
            task.mDelegate = Preconditions.checkNotNull((Job) job);
            task.mAsync = true;
            enqueue(task);
            return task;