Batch.java
3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package com.google.android.gms.common.api;
import com.google.android.gms.internal.zzaaf;
import java.util.ArrayList;
import java.util.List;
public final class Batch
extends zzaaf<BatchResult>
{
private int b;
private boolean c;
private boolean d;
private final PendingResult<?>[] e;
private final Object f = new Object();
private Batch(List<PendingResult<?>> paramList, GoogleApiClient paramGoogleApiClient)
{
super(paramGoogleApiClient);
this.b = paramList.size();
this.e = new PendingResult[this.b];
if (paramList.isEmpty()) {
zzb(new BatchResult(Status.zzazx, this.e));
}
for (;;)
{
return;
int i = 0;
while (i < paramList.size())
{
paramGoogleApiClient = (PendingResult)paramList.get(i);
this.e[i] = paramGoogleApiClient;
paramGoogleApiClient.zza(new PendingResult.zza()
{
public final void zzy(Status paramAnonymousStatus)
{
for (;;)
{
synchronized (Batch.a(Batch.this))
{
if (Batch.this.isCanceled()) {
return;
}
if (paramAnonymousStatus.isCanceled())
{
Batch.b(Batch.this);
Batch.d(Batch.this);
if (Batch.e(Batch.this) == 0)
{
if (!Batch.f(Batch.this)) {
break;
}
Batch.g(Batch.this);
}
return;
}
}
if (!paramAnonymousStatus.isSuccess()) {
Batch.c(Batch.this);
}
}
if (Batch.h(Batch.this)) {}
for (paramAnonymousStatus = new Status(13);; paramAnonymousStatus = Status.zzazx)
{
Batch.this.zzb(new BatchResult(paramAnonymousStatus, Batch.i(Batch.this)));
break;
}
}
});
i += 1;
}
}
}
public final void cancel()
{
super.cancel();
PendingResult[] arrayOfPendingResult = this.e;
int j = arrayOfPendingResult.length;
int i = 0;
while (i < j)
{
arrayOfPendingResult[i].cancel();
i += 1;
}
}
public final BatchResult createFailedResult(Status paramStatus)
{
return new BatchResult(paramStatus, this.e);
}
public static final class Builder
{
private List<PendingResult<?>> a = new ArrayList();
private GoogleApiClient b;
public Builder(GoogleApiClient paramGoogleApiClient)
{
this.b = paramGoogleApiClient;
}
public final <R extends Result> BatchResultToken<R> add(PendingResult<R> paramPendingResult)
{
BatchResultToken localBatchResultToken = new BatchResultToken(this.a.size());
this.a.add(paramPendingResult);
return localBatchResultToken;
}
public final Batch build()
{
return new Batch(this.a, this.b, (byte)0);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/android/gms/common/api/Batch.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/