package com.google.android.gms.common.api.internal; import com.google.android.gms.common.api.OptionalPendingResult; import com.google.android.gms.common.api.PendingResult; import com.google.android.gms.common.api.Result; import com.google.android.gms.common.api.ResultCallback; import com.google.android.gms.common.api.ResultTransform; import com.google.android.gms.common.api.TransformedResult; import java.util.concurrent.TimeUnit; /* loaded from: classes.dex */ public final class OptionalPendingResultImpl extends OptionalPendingResult { private final BasePendingResult zaa; @Override // com.google.android.gms.common.api.PendingResult public final void addStatusListener(PendingResult.StatusListener statusListener) { this.zaa.addStatusListener(statusListener); } @Override // com.google.android.gms.common.api.PendingResult public final R await() { return this.zaa.await(); } @Override // com.google.android.gms.common.api.PendingResult public final void cancel() { this.zaa.cancel(); } @Override // com.google.android.gms.common.api.OptionalPendingResult public final R get() { if (this.zaa.isReady()) { return this.zaa.await(0L, TimeUnit.MILLISECONDS); } throw new IllegalStateException("Result is not available. Check that isDone() returns true before calling get()."); } @Override // com.google.android.gms.common.api.PendingResult public final boolean isCanceled() { return this.zaa.isCanceled(); } @Override // com.google.android.gms.common.api.OptionalPendingResult public final boolean isDone() { return this.zaa.isReady(); } @Override // com.google.android.gms.common.api.PendingResult public final void setResultCallback(ResultCallback resultCallback) { this.zaa.setResultCallback(resultCallback); } @Override // com.google.android.gms.common.api.PendingResult public final TransformedResult then(ResultTransform resultTransform) { return this.zaa.then(resultTransform); } @Override // com.google.android.gms.common.api.PendingResult public final R await(long j, TimeUnit timeUnit) { return this.zaa.await(j, timeUnit); } @Override // com.google.android.gms.common.api.PendingResult public final void setResultCallback(ResultCallback resultCallback, long j, TimeUnit timeUnit) { this.zaa.setResultCallback(resultCallback, j, timeUnit); } public OptionalPendingResultImpl(PendingResult pendingResult) { this.zaa = (BasePendingResult) pendingResult; } }