package com.google.android.gms.common.api; import android.os.Looper; import com.google.android.gms.common.api.internal.OptionalPendingResultImpl; import com.google.android.gms.common.api.internal.StatusPendingResult; import com.google.android.gms.common.internal.Preconditions; /* loaded from: classes.dex */ public final class PendingResults { public static PendingResult canceledPendingResult() { StatusPendingResult statusPendingResult = new StatusPendingResult(Looper.getMainLooper()); statusPendingResult.cancel(); return statusPendingResult; } public static PendingResult immediateFailedResult(R r, GoogleApiClient googleApiClient) { Preconditions.checkNotNull(r, "Result must not be null"); Preconditions.checkArgument(!r.getStatus().isSuccess(), "Status code must not be SUCCESS"); zag zagVar = new zag(googleApiClient, r); zagVar.setResult(r); return zagVar; } public static OptionalPendingResult immediatePendingResult(R r) { Preconditions.checkNotNull(r, "Result must not be null"); zah zahVar = new zah(null); zahVar.setResult(r); return new OptionalPendingResultImpl(zahVar); } public static PendingResult canceledPendingResult(R r) { Preconditions.checkNotNull(r, "Result must not be null"); Preconditions.checkArgument(r.getStatus().getStatusCode() == 16, "Status code must be CommonStatusCodes.CANCELED"); zaf zafVar = new zaf(r); zafVar.cancel(); return zafVar; } public static OptionalPendingResult immediatePendingResult(R r, GoogleApiClient googleApiClient) { Preconditions.checkNotNull(r, "Result must not be null"); zah zahVar = new zah(googleApiClient); zahVar.setResult(r); return new OptionalPendingResultImpl(zahVar); } public static PendingResult immediatePendingResult(Status status) { Preconditions.checkNotNull(status, "Result must not be null"); StatusPendingResult statusPendingResult = new StatusPendingResult(Looper.getMainLooper()); statusPendingResult.setResult(status); return statusPendingResult; } public static PendingResult immediatePendingResult(Status status, GoogleApiClient googleApiClient) { Preconditions.checkNotNull(status, "Result must not be null"); StatusPendingResult statusPendingResult = new StatusPendingResult(googleApiClient); statusPendingResult.setResult(status); return statusPendingResult; } private PendingResults() { } }