Initial version -- added millennium read funcionality
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.errorprone.annotations.ResultIgnorabilityUnspecified;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class BatchResult implements Result {
|
||||
private final Status zaa;
|
||||
private final PendingResult[] zab;
|
||||
|
||||
BatchResult(Status status, PendingResult[] pendingResultArr) {
|
||||
this.zaa = status;
|
||||
this.zab = pendingResultArr;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Result
|
||||
public Status getStatus() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
public <R extends Result> R take(BatchResultToken<R> batchResultToken) {
|
||||
Preconditions.checkArgument(batchResultToken.mId < this.zab.length, "The result token does not belong to this batch");
|
||||
return (R) this.zab[batchResultToken.mId].await(0L, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user