zzauk.java
10.4 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
package com.google.android.gms.internal;
import android.app.Activity;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.support.annotation.MainThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.Size;
import android.support.annotation.WorkerThread;
import android.support.v4.util.ArrayMap;
import com.google.android.gms.common.internal.zzac;
import com.google.android.gms.common.util.zze;
import com.google.android.gms.measurement.AppMeasurement.zzd;
import com.google.android.gms.measurement.AppMeasurement.zzf;
import hz;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
public class zzauk
extends hz
{
private volatile AppMeasurement.zzf a;
private AppMeasurement.zzf b;
private long c;
private final Map<Activity, a> d = new ArrayMap();
private final CopyOnWriteArrayList<AppMeasurement.zzd> e = new CopyOnWriteArrayList();
private boolean f;
private AppMeasurement.zzf g;
private String h;
protected a zzbvm;
public zzauk(zzaue paramzzaue)
{
super(paramzzaue);
}
@MainThread
private a a(@NonNull Activity paramActivity)
{
zzac.zzw(paramActivity);
a locala2 = (a)this.d.get(paramActivity);
a locala1 = locala2;
if (locala2 == null)
{
locala1 = new a(null, a(paramActivity.getClass().getCanonicalName()), zzKh().zzNi());
this.d.put(paramActivity, locala1);
}
return locala1;
}
private static String a(String paramString)
{
Object localObject = paramString.split("\\.");
if (localObject.length == 0) {
paramString = paramString.substring(0, 36);
}
do
{
return paramString;
localObject = localObject[(localObject.length - 1)];
paramString = (String)localObject;
} while (((String)localObject).length() <= 36);
return ((String)localObject).substring(0, 36);
}
@MainThread
private void a(final Activity paramActivity, a parama, final boolean paramBoolean)
{
boolean bool2 = true;
boolean bool1 = true;
if (this.a != null) {}
Object localObject;
label290:
for (AppMeasurement.zzf localzzf = this.a;; localObject = null)
{
if (localzzf != null) {}
for (localzzf = new AppMeasurement.zzf(localzzf);; localObject = null)
{
this.f = true;
for (;;)
{
try
{
Iterator localIterator = this.e.iterator();
bool2 = bool1;
if (!localIterator.hasNext()) {
continue;
}
bool2 = bool1;
AppMeasurement.zzd localzzd = (AppMeasurement.zzd)localIterator.next();
try
{
boolean bool3 = localzzd.zza(localzzf, parama);
bool1 &= bool3;
}
catch (Exception localException2)
{
bool2 = bool1;
zzKl().zzLY().zzj("onScreenChangeCallback threw exception", localException2);
}
if ((this.b == null) || (Math.abs(zznR().elapsedRealtime() - this.c) >= 1000L)) {
break label290;
}
localzzf = this.b;
break;
}
catch (Exception localException1)
{
zzKl().zzLY().zzj("onScreenChangeCallback loop threw exception", localException1);
this.f = false;
bool1 = bool2;
if (!bool1) {
continue;
}
if (parama.zzbqg != null) {
continue;
}
parama.zzbqg = a(paramActivity.getClass().getCanonicalName());
paramActivity = new a(parama);
this.b = this.a;
this.c = zznR().elapsedRealtime();
this.a = paramActivity;
zzKk().zzm(new Runnable()
{
public final void run()
{
if ((paramBoolean) && (zzauk.this.zzbvm != null)) {
zzauk.a(zzauk.this, zzauk.this.zzbvm);
}
zzauk.this.zzbvm = paramActivity;
zzauk.this.zzKd().zza(paramActivity);
}
});
return;
this.f = false;
}
finally
{
this.f = false;
}
}
}
}
}
public static void zza(AppMeasurement.zzf paramzzf, Bundle paramBundle)
{
if ((paramBundle != null) && (paramzzf != null) && (!paramBundle.containsKey("_sc")))
{
if (paramzzf.zzbqf != null) {
paramBundle.putString("_sn", paramzzf.zzbqf);
}
paramBundle.putString("_sc", paramzzf.zzbqg);
paramBundle.putLong("_si", paramzzf.zzbqh);
}
}
@MainThread
public void onActivityCreated(Activity paramActivity, Bundle paramBundle)
{
if (paramBundle == null) {}
do
{
return;
paramBundle = paramBundle.getBundle("com.google.firebase.analytics.screen_service");
} while (paramBundle == null);
paramActivity = a(paramActivity);
paramActivity.zzbqh = paramBundle.getLong("id");
paramActivity.zzbqf = paramBundle.getString("name");
paramActivity.zzbqg = paramBundle.getString("referrer_name");
}
@MainThread
public void onActivityDestroyed(Activity paramActivity)
{
this.d.remove(paramActivity);
}
@MainThread
public void onActivityPaused(final Activity paramActivity)
{
paramActivity = a(paramActivity);
this.b = this.a;
this.c = zznR().elapsedRealtime();
this.a = null;
zzKk().zzm(new Runnable()
{
public final void run()
{
zzauk.a(zzauk.this, paramActivity);
zzauk.this.zzbvm = null;
zzauk.this.zzKd().zza(null);
}
});
}
@MainThread
public void onActivityResumed(Activity paramActivity)
{
a(paramActivity, a(paramActivity), false);
zzJY().zzJU();
}
@MainThread
public void onActivitySaveInstanceState(Activity paramActivity, Bundle paramBundle)
{
if (paramBundle == null) {}
do
{
return;
paramActivity = (a)this.d.get(paramActivity);
} while (paramActivity == null);
Bundle localBundle = new Bundle();
localBundle.putLong("id", paramActivity.zzbqh);
localBundle.putString("name", paramActivity.zzbqf);
localBundle.putString("referrer_name", paramActivity.zzbqg);
paramBundle.putBundle("com.google.firebase.analytics.screen_service", localBundle);
}
@MainThread
public void registerOnScreenChangeCallback(@NonNull AppMeasurement.zzd paramzzd)
{
zzJW();
if (paramzzd == null)
{
zzKl().zzMa().log("Attempting to register null OnScreenChangeCallback");
return;
}
this.e.remove(paramzzd);
this.e.add(paramzzd);
}
@MainThread
public void setCurrentScreen(@NonNull Activity paramActivity, @Nullable @Size(max=36L, min=1L) String paramString1, @Nullable @Size(max=36L, min=1L) String paramString2)
{
int i = Build.VERSION.SDK_INT;
if (paramActivity == null)
{
zzKl().zzMa().log("setCurrentScreen must be called with a non-null activity");
return;
}
if (!zzKk().zzbc())
{
zzKl().zzMa().log("setCurrentScreen must be called from the main thread");
return;
}
if (this.f)
{
zzKl().zzMa().log("Cannot call setCurrentScreen from onScreenChangeCallback");
return;
}
if (this.a == null)
{
zzKl().zzMa().log("setCurrentScreen cannot be called while no activity active");
return;
}
if (this.d.get(paramActivity) == null)
{
zzKl().zzMa().log("setCurrentScreen must be called with an activity in the activity lifecycle");
return;
}
String str = paramString2;
if (paramString2 == null) {
str = a(paramActivity.getClass().getCanonicalName());
}
boolean bool = this.a.zzbqg.equals(str);
if (((this.a.zzbqf == null) && (paramString1 == null)) || ((this.a.zzbqf != null) && (this.a.zzbqf.equals(paramString1)))) {}
for (i = 1; (bool) && (i != 0); i = 0)
{
zzKl().zzMb().log("setCurrentScreen cannot be called with the same class and name");
return;
}
if (paramString1 != null) {
if (paramString1.length() > 0)
{
i = paramString1.length();
zzKn();
if (i <= zzati.c()) {}
}
else
{
zzKl().zzMa().zzj("Invalid screen name length in setCurrentScreen. Length", Integer.valueOf(paramString1.length()));
return;
}
}
if (str != null) {
if (str.length() > 0)
{
i = str.length();
zzKn();
if (i <= zzati.c()) {}
}
else
{
zzKl().zzMa().zzj("Invalid class name length in setCurrentScreen. Length", Integer.valueOf(str.length()));
return;
}
}
zzatx.zza localzza = zzKl().zzMe();
if (paramString1 == null) {}
for (paramString2 = "null";; paramString2 = paramString1)
{
localzza.zze("Setting current screen to name, class", paramString2, str);
paramString1 = new a(paramString1, str, zzKh().zzNi());
this.d.put(paramActivity, paramString1);
a(paramActivity, paramString1, true);
return;
}
}
@MainThread
public void unregisterOnScreenChangeCallback(@NonNull AppMeasurement.zzd paramzzd)
{
zzJW();
this.e.remove(paramzzd);
}
@WorkerThread
public a zzMU()
{
zzob();
zzmR();
return this.zzbvm;
}
public AppMeasurement.zzf zzMV()
{
zzJW();
AppMeasurement.zzf localzzf = this.a;
if (localzzf == null) {
return null;
}
return new AppMeasurement.zzf(localzzf);
}
@WorkerThread
public void zza(String paramString, AppMeasurement.zzf paramzzf)
{
zzmR();
try
{
if ((this.h == null) || (this.h.equals(paramString)) || (paramzzf != null))
{
this.h = paramString;
this.g = paramzzf;
}
return;
}
finally {}
}
protected void zzmS() {}
static final class a
extends AppMeasurement.zzf
{
public boolean a;
public a(a parama)
{
this.zzbqf = parama.zzbqf;
this.zzbqg = parama.zzbqg;
this.zzbqh = parama.zzbqh;
this.a = parama.a;
}
public a(String paramString1, String paramString2, long paramLong)
{
this.zzbqf = paramString1;
this.zzbqg = paramString2;
this.zzbqh = paramLong;
this.a = false;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/android/gms/internal/zzauk.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/