if.java
35.8 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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.Uri;
import android.net.Uri.Builder;
import android.os.Build.VERSION;
import android.text.TextUtils;
import com.google.android.gms.common.internal.zzac;
import com.google.android.gms.common.util.zze;
import com.google.android.gms.common.util.zzo;
import com.google.android.gms.internal.zzsa;
import com.google.android.gms.internal.zzsc;
import com.google.android.gms.internal.zzse;
import com.google.android.gms.internal.zzsp;
import com.google.android.gms.internal.zzsv;
import com.google.android.gms.internal.zzsz;
import com.google.android.gms.internal.zztd;
import com.google.android.gms.internal.zztm;
import java.io.Closeable;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
public final class if
extends zzsa
implements Closeable
{
private static final String a = String.format("CREATE TABLE IF NOT EXISTS %s ( '%s' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, '%s' INTEGER NOT NULL, '%s' TEXT NOT NULL, '%s' TEXT NOT NULL, '%s' INTEGER);", new Object[] { "hits2", "hit_id", "hit_time", "hit_url", "hit_string", "hit_app_id" });
private static final String b = String.format("SELECT MAX(%s) FROM %s WHERE 1;", new Object[] { "hit_time", "hits2" });
private final if.a c;
private final im d = new im(zznR());
private final im e = new im(zznR());
public if(zzsc paramzzsc)
{
super(paramzzsc);
String str = zznT().zzpv();
this.c = new if.a(paramzzsc.getContext(), str);
}
private long a(String paramString)
{
Object localObject2 = null;
Object localObject1 = null;
Object localObject3 = l();
try
{
localObject3 = ((SQLiteDatabase)localObject3).rawQuery(paramString, null);
localObject1 = localObject3;
localObject2 = localObject3;
if (((Cursor)localObject3).moveToFirst())
{
localObject1 = localObject3;
localObject2 = localObject3;
long l = ((Cursor)localObject3).getLong(0);
return l;
}
localObject1 = localObject3;
localObject2 = localObject3;
throw new SQLiteException("Database returned empty set");
}
catch (SQLiteException localSQLiteException)
{
localObject2 = localObject1;
zzd("Database error", paramString, localSQLiteException);
localObject2 = localObject1;
throw localSQLiteException;
}
finally
{
if (localObject2 != null) {
((Cursor)localObject2).close();
}
}
}
/* Error */
private long a(String paramString, String[] paramArrayOfString)
{
// Byte code:
// 0: aload_0
// 1: invokespecial 92 if:l ()Landroid/database/sqlite/SQLiteDatabase;
// 4: astore 7
// 6: aconst_null
// 7: astore 5
// 9: aconst_null
// 10: astore 6
// 12: aload 7
// 14: aload_1
// 15: aload_2
// 16: invokevirtual 98 android/database/sqlite/SQLiteDatabase:rawQuery (Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
// 19: astore_2
// 20: aload_2
// 21: invokeinterface 104 1 0
// 26: ifeq +23 -> 49
// 29: aload_2
// 30: iconst_0
// 31: invokeinterface 108 2 0
// 36: lstore_3
// 37: aload_2
// 38: ifnull +9 -> 47
// 41: aload_2
// 42: invokeinterface 111 1 0
// 47: lload_3
// 48: lreturn
// 49: aload_2
// 50: ifnull +9 -> 59
// 53: aload_2
// 54: invokeinterface 111 1 0
// 59: lconst_0
// 60: lreturn
// 61: astore 5
// 63: aload 6
// 65: astore_2
// 66: aload 5
// 68: astore 6
// 70: aload_2
// 71: astore 5
// 73: aload_0
// 74: ldc 118
// 76: aload_1
// 77: aload 6
// 79: invokevirtual 122 if:zzd (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
// 82: aload_2
// 83: astore 5
// 85: aload 6
// 87: athrow
// 88: astore_1
// 89: aload 5
// 91: ifnull +10 -> 101
// 94: aload 5
// 96: invokeinterface 111 1 0
// 101: aload_1
// 102: athrow
// 103: astore_1
// 104: aload_2
// 105: astore 5
// 107: goto -18 -> 89
// 110: astore 6
// 112: goto -42 -> 70
// Local variable table:
// start length slot name signature
// 0 115 0 this if
// 0 115 1 paramString String
// 0 115 2 paramArrayOfString String[]
// 36 12 3 l long
// 7 1 5 localObject Object
// 61 6 5 localSQLiteException1 SQLiteException
// 71 35 5 arrayOfString String[]
// 10 76 6 localSQLiteException2 SQLiteException
// 110 1 6 localSQLiteException3 SQLiteException
// 4 9 7 localSQLiteDatabase SQLiteDatabase
// Exception table:
// from to target type
// 12 20 61 android/database/sqlite/SQLiteException
// 12 20 88 finally
// 73 82 88 finally
// 85 88 88 finally
// 20 37 103 finally
// 20 37 110 android/database/sqlite/SQLiteException
}
private Map<String, String> b(String paramString)
{
if (TextUtils.isEmpty(paramString)) {
return new HashMap(0);
}
try
{
if (paramString.startsWith("?")) {}
for (;;)
{
return zzo.zza(new URI(paramString), "UTF-8");
paramString = String.valueOf(paramString);
if (paramString.length() != 0) {
paramString = "?".concat(paramString);
} else {
paramString = new String("?");
}
}
return new HashMap(0);
}
catch (URISyntaxException paramString)
{
zze("Error parsing hit parameters", paramString);
}
}
/* Error */
private List<Long> c(long paramLong)
{
// Byte code:
// 0: aconst_null
// 1: astore 5
// 3: aload_0
// 4: invokevirtual 181 if:zzmR ()V
// 7: aload_0
// 8: invokevirtual 184 if:zzob ()V
// 11: lload_1
// 12: lconst_0
// 13: lcmp
// 14: ifgt +7 -> 21
// 17: invokestatic 190 java/util/Collections:emptyList ()Ljava/util/List;
// 20: areturn
// 21: aload_0
// 22: invokespecial 92 if:l ()Landroid/database/sqlite/SQLiteDatabase;
// 25: astore 4
// 27: new 192 java/util/ArrayList
// 30: dup
// 31: invokespecial 194 java/util/ArrayList:<init> ()V
// 34: astore 7
// 36: ldc -60
// 38: iconst_1
// 39: anewarray 22 java/lang/Object
// 42: dup
// 43: iconst_0
// 44: ldc 26
// 46: aastore
// 47: invokestatic 40 java/lang/String:format (Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
// 50: astore 6
// 52: lload_1
// 53: invokestatic 202 java/lang/Long:toString (J)Ljava/lang/String;
// 56: astore 8
// 58: aload 4
// 60: ldc 24
// 62: iconst_1
// 63: anewarray 36 java/lang/String
// 66: dup
// 67: iconst_0
// 68: ldc 26
// 70: aastore
// 71: aconst_null
// 72: aconst_null
// 73: aconst_null
// 74: aconst_null
// 75: aload 6
// 77: aload 8
// 79: invokevirtual 206 android/database/sqlite/SQLiteDatabase:query (Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
// 82: astore 4
// 84: aload 4
// 86: astore 5
// 88: aload 5
// 90: astore 4
// 92: aload 5
// 94: invokeinterface 104 1 0
// 99: ifeq +42 -> 141
// 102: aload 5
// 104: astore 4
// 106: aload 7
// 108: aload 5
// 110: iconst_0
// 111: invokeinterface 108 2 0
// 116: invokestatic 209 java/lang/Long:valueOf (J)Ljava/lang/Long;
// 119: invokeinterface 215 2 0
// 124: pop
// 125: aload 5
// 127: astore 4
// 129: aload 5
// 131: invokeinterface 218 1 0
// 136: istore_3
// 137: iload_3
// 138: ifne -36 -> 102
// 141: aload 5
// 143: ifnull +10 -> 153
// 146: aload 5
// 148: invokeinterface 111 1 0
// 153: aload 7
// 155: areturn
// 156: astore 6
// 158: aconst_null
// 159: astore 5
// 161: aload 5
// 163: astore 4
// 165: aload_0
// 166: ldc -36
// 168: aload 6
// 170: invokevirtual 222 if:zzd (Ljava/lang/String;Ljava/lang/Object;)V
// 173: aload 5
// 175: ifnull -22 -> 153
// 178: aload 5
// 180: invokeinterface 111 1 0
// 185: goto -32 -> 153
// 188: astore 4
// 190: aload 5
// 192: ifnull +10 -> 202
// 195: aload 5
// 197: invokeinterface 111 1 0
// 202: aload 4
// 204: athrow
// 205: astore 6
// 207: aload 4
// 209: astore 5
// 211: aload 6
// 213: astore 4
// 215: goto -25 -> 190
// 218: astore 6
// 220: goto -59 -> 161
// Local variable table:
// start length slot name signature
// 0 223 0 this if
// 0 223 1 paramLong long
// 136 2 3 bool boolean
// 25 139 4 localObject1 Object
// 188 20 4 localObject2 Object
// 213 1 4 localObject3 Object
// 1 209 5 localObject4 Object
// 50 26 6 str1 String
// 156 13 6 localSQLiteException1 SQLiteException
// 205 7 6 localObject5 Object
// 218 1 6 localSQLiteException2 SQLiteException
// 34 120 7 localArrayList ArrayList
// 56 22 8 str2 String
// Exception table:
// from to target type
// 36 84 156 android/database/sqlite/SQLiteException
// 36 84 188 finally
// 92 102 205 finally
// 106 125 205 finally
// 129 137 205 finally
// 165 173 205 finally
// 92 102 218 android/database/sqlite/SQLiteException
// 106 125 218 android/database/sqlite/SQLiteException
// 129 137 218 android/database/sqlite/SQLiteException
}
private Map<String, String> c(String paramString)
{
if (TextUtils.isEmpty(paramString)) {
return new HashMap(0);
}
try
{
paramString = String.valueOf(paramString);
if (paramString.length() != 0) {}
for (paramString = "?".concat(paramString);; paramString = new String("?")) {
return zzo.zza(new URI(paramString), "UTF-8");
}
return new HashMap(0);
}
catch (URISyntaxException paramString)
{
zze("Error parsing property parameters", paramString);
}
}
private long k()
{
zzmR();
zzob();
return a("SELECT COUNT(*) FROM hits2");
}
private SQLiteDatabase l()
{
try
{
SQLiteDatabase localSQLiteDatabase = this.c.getWritableDatabase();
return localSQLiteDatabase;
}
catch (SQLiteException localSQLiteException)
{
zzd("Error opening database", localSQLiteException);
throw localSQLiteException;
}
}
public final long a(long paramLong, String paramString1, String paramString2)
{
zzac.zzdr(paramString1);
zzac.zzdr(paramString2);
zzob();
zzmR();
return a("SELECT hits_count FROM properties WHERE app_uid=? AND cid=? AND tid=?", new String[] { String.valueOf(paramLong), paramString1, paramString2 });
}
public final List<zzsz> a(long paramLong)
{
boolean bool = true;
Cursor localCursor = null;
if (paramLong >= 0L) {}
for (;;)
{
zzac.zzax(bool);
zzmR();
zzob();
Object localObject5 = l();
localObject1 = localCursor;
for (;;)
{
try
{
str1 = String.format("%s ASC", new Object[] { "hit_id" });
localObject1 = localCursor;
str2 = Long.toString(paramLong);
localObject1 = localCursor;
localCursor = ((SQLiteDatabase)localObject5).query("hits2", new String[] { "hit_id", "hit_time", "hit_string", "hit_url", "hit_app_id" }, null, null, null, null, str1, str2);
localObject1 = localCursor;
}
catch (SQLiteException localSQLiteException1)
{
String str1;
String str2;
localObject1 = null;
try
{
zze("Error loading hits from the database", localSQLiteException1);
throw localSQLiteException1;
}
finally
{
if (localObject1 != null) {
((Cursor)localObject1).close();
}
}
}
finally
{
continue;
}
try
{
localObject5 = new ArrayList();
localObject1 = localCursor;
if (localCursor.moveToFirst())
{
localObject1 = localCursor;
paramLong = localCursor.getLong(0);
localObject1 = localCursor;
long l = localCursor.getLong(1);
localObject1 = localCursor;
str1 = localCursor.getString(2);
localObject1 = localCursor;
str2 = localCursor.getString(3);
localObject1 = localCursor;
int i = localCursor.getInt(4);
localObject1 = localCursor;
((List)localObject5).add(new zzsz(this, b(str1), l, zztm.zzcj(str2), paramLong, i));
localObject1 = localCursor;
bool = localCursor.moveToNext();
if (bool) {
continue;
}
}
if (localCursor != null) {
localCursor.close();
}
return (List<zzsz>)localObject5;
}
catch (SQLiteException localSQLiteException2)
{
localObject1 = localObject3;
Object localObject4 = localSQLiteException2;
}
}
bool = false;
}
}
public final void a()
{
zzob();
l().beginTransaction();
}
public final void a(long paramLong, String paramString)
{
zzac.zzdr(paramString);
zzob();
zzmR();
int i = l().delete("properties", "app_uid=? AND cid<>?", new String[] { String.valueOf(paramLong), paramString });
if (i > 0) {
zza("Deleted property records", Integer.valueOf(i));
}
}
public final void a(zzse paramzzse)
{
zzac.zzw(paramzzse);
zzob();
zzmR();
SQLiteDatabase localSQLiteDatabase = l();
Object localObject2 = paramzzse.zzfE();
zzac.zzw(localObject2);
Object localObject1 = new Uri.Builder();
localObject2 = ((Map)localObject2).entrySet().iterator();
while (((Iterator)localObject2).hasNext())
{
Map.Entry localEntry = (Map.Entry)((Iterator)localObject2).next();
((Uri.Builder)localObject1).appendQueryParameter((String)localEntry.getKey(), (String)localEntry.getValue());
}
localObject2 = ((Uri.Builder)localObject1).build().getEncodedQuery();
localObject1 = localObject2;
if (localObject2 == null) {
localObject1 = "";
}
localObject2 = new ContentValues();
((ContentValues)localObject2).put("app_uid", Long.valueOf(paramzzse.zzoj()));
((ContentValues)localObject2).put("cid", paramzzse.zzmy());
((ContentValues)localObject2).put("tid", paramzzse.zzok());
if (paramzzse.zzol()) {}
for (int i = 1;; i = 0)
{
((ContentValues)localObject2).put("adid", Integer.valueOf(i));
((ContentValues)localObject2).put("hits_count", Long.valueOf(paramzzse.zzom()));
((ContentValues)localObject2).put("params", (String)localObject1);
try
{
if (localSQLiteDatabase.insertWithOnConflict("properties", null, (ContentValues)localObject2, 5) == -1L) {
zzbT("Failed to insert/update a property (got -1)");
}
return;
}
catch (SQLiteException paramzzse)
{
zze("Error storing a property", paramzzse);
}
}
}
public final void a(zzsz paramzzsz)
{
zzac.zzw(paramzzsz);
zzmR();
zzob();
zzac.zzw(paramzzsz);
Object localObject1 = new Uri.Builder();
Object localObject2 = paramzzsz.zzfE().entrySet().iterator();
while (((Iterator)localObject2).hasNext())
{
localObject3 = (Map.Entry)((Iterator)localObject2).next();
String str = (String)((Map.Entry)localObject3).getKey();
if ((!"ht".equals(str)) && (!"qt".equals(str)) && (!"AppUID".equals(str))) {
((Uri.Builder)localObject1).appendQueryParameter(str, (String)((Map.Entry)localObject3).getValue());
}
}
localObject2 = ((Uri.Builder)localObject1).build().getEncodedQuery();
localObject1 = localObject2;
if (localObject2 == null) {
localObject1 = "";
}
if (((String)localObject1).length() > 8192)
{
zznS().zza(paramzzsz, "Hit length exceeds the maximum allowed size");
return;
}
int i = zznT().zzpt();
long l = k();
if (l > i - 1)
{
localObject2 = c(l - i + 1L);
zzd("Store full, deleting hits to make room, count", Integer.valueOf(((List)localObject2).size()));
a((List)localObject2);
}
localObject2 = l();
Object localObject3 = new ContentValues();
((ContentValues)localObject3).put("hit_string", (String)localObject1);
((ContentValues)localObject3).put("hit_time", Long.valueOf(paramzzsz.zzpQ()));
((ContentValues)localObject3).put("hit_app_id", Integer.valueOf(paramzzsz.zzpO()));
if (paramzzsz.zzpS()) {}
for (localObject1 = zznT().zzpj();; localObject1 = zznT().zzpk())
{
((ContentValues)localObject3).put("hit_url", (String)localObject1);
try
{
l = ((SQLiteDatabase)localObject2).insert("hits2", null, (ContentValues)localObject3);
if (l != -1L) {
break;
}
zzbT("Failed to insert a hit (got -1)");
return;
}
catch (SQLiteException paramzzsz)
{
zze("Error storing a hit", paramzzsz);
return;
}
}
zzb("Hit saved to database. db-id, hit", Long.valueOf(l), paramzzsz);
}
public final void a(List<Long> paramList)
{
zzac.zzw(paramList);
zzmR();
zzob();
if (paramList.isEmpty()) {}
for (;;)
{
return;
Object localObject1 = new StringBuilder("hit_id");
((StringBuilder)localObject1).append(" in (");
int i = 0;
Object localObject2;
while (i < paramList.size())
{
localObject2 = (Long)paramList.get(i);
if ((localObject2 == null) || (((Long)localObject2).longValue() == 0L)) {
throw new SQLiteException("Invalid hit id");
}
if (i > 0) {
((StringBuilder)localObject1).append(",");
}
((StringBuilder)localObject1).append(localObject2);
i += 1;
}
((StringBuilder)localObject1).append(")");
localObject1 = ((StringBuilder)localObject1).toString();
try
{
localObject2 = l();
zza("Deleting dispatched hits. count", Integer.valueOf(paramList.size()));
i = ((SQLiteDatabase)localObject2).delete("hits2", (String)localObject1, null);
if (i == paramList.size()) {
continue;
}
zzb("Deleted fewer hits then expected", Integer.valueOf(paramList.size()), Integer.valueOf(i), localObject1);
return;
}
catch (SQLiteException paramList)
{
zze("Error deleting hits", paramList);
throw paramList;
}
}
}
public final void b()
{
zzob();
l().setTransactionSuccessful();
}
public final void b(long paramLong)
{
zzmR();
zzob();
ArrayList localArrayList = new ArrayList(1);
localArrayList.add(Long.valueOf(paramLong));
zza("Deleting hit, id", Long.valueOf(paramLong));
a(localArrayList);
}
public final void c()
{
zzob();
l().endTransaction();
}
public final void close()
{
try
{
this.c.close();
return;
}
catch (SQLiteException localSQLiteException)
{
zze("Sql error closing database", localSQLiteException);
return;
}
catch (IllegalStateException localIllegalStateException)
{
zze("Error closing database", localIllegalStateException);
}
}
public final void d()
{
zzmR();
zzob();
l().delete("hits2", null, null);
}
public final void e()
{
zzmR();
zzob();
l().delete("properties", null, null);
}
final boolean f()
{
return k() == 0L;
}
public final int g()
{
zzmR();
zzob();
if (!this.d.a(86400000L)) {
return 0;
}
this.d.a();
zzbP("Deleting stale hits (if any)");
int i = l().delete("hits2", "hit_time < ?", new String[] { Long.toString(zznR().currentTimeMillis() - 2592000000L) });
zza("Deleted stale hits, count", Integer.valueOf(i));
return i;
}
public final long h()
{
zzmR();
zzob();
return a(b, null);
}
/* Error */
public final List<zzse> i()
{
// Byte code:
// 0: aconst_null
// 1: astore 6
// 3: aload_0
// 4: invokevirtual 184 if:zzob ()V
// 7: aload_0
// 8: invokevirtual 181 if:zzmR ()V
// 11: aload_0
// 12: invokespecial 92 if:l ()Landroid/database/sqlite/SQLiteDatabase;
// 15: astore 7
// 17: aload 6
// 19: astore 5
// 21: aload_0
// 22: invokevirtual 68 if:zznT ()Lcom/google/android/gms/internal/zzsp;
// 25: invokevirtual 559 com/google/android/gms/internal/zzsp:zzpu ()I
// 28: istore_1
// 29: aload 6
// 31: astore 5
// 33: aload 7
// 35: ldc_w 282
// 38: iconst_5
// 39: anewarray 36 java/lang/String
// 42: dup
// 43: iconst_0
// 44: ldc_w 369
// 47: aastore
// 48: dup
// 49: iconst_1
// 50: ldc_w 377
// 53: aastore
// 54: dup
// 55: iconst_2
// 56: ldc_w 385
// 59: aastore
// 60: dup
// 61: iconst_3
// 62: ldc_w 390
// 65: aastore
// 66: dup
// 67: iconst_4
// 68: ldc_w 395
// 71: aastore
// 72: ldc_w 561
// 75: iconst_1
// 76: anewarray 36 java/lang/String
// 79: dup
// 80: iconst_0
// 81: ldc_w 563
// 84: aastore
// 85: aconst_null
// 86: aconst_null
// 87: aconst_null
// 88: iload_1
// 89: invokestatic 565 java/lang/String:valueOf (I)Ljava/lang/String;
// 92: invokevirtual 206 android/database/sqlite/SQLiteDatabase:query (Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
// 95: astore 6
// 97: aload 6
// 99: astore 5
// 101: new 192 java/util/ArrayList
// 104: dup
// 105: invokespecial 194 java/util/ArrayList:<init> ()V
// 108: astore 7
// 110: aload 6
// 112: astore 5
// 114: aload 6
// 116: invokeinterface 104 1 0
// 121: ifeq +133 -> 254
// 124: aload 6
// 126: astore 5
// 128: aload 6
// 130: iconst_0
// 131: invokeinterface 257 2 0
// 136: astore 8
// 138: aload 6
// 140: astore 5
// 142: aload 6
// 144: iconst_1
// 145: invokeinterface 257 2 0
// 150: astore 9
// 152: aload 6
// 154: astore 5
// 156: aload 6
// 158: iconst_2
// 159: invokeinterface 261 2 0
// 164: ifeq +131 -> 295
// 167: iconst_1
// 168: istore_2
// 169: aload 6
// 171: astore 5
// 173: aload 6
// 175: iconst_3
// 176: invokeinterface 261 2 0
// 181: i2l
// 182: lstore_3
// 183: aload 6
// 185: astore 5
// 187: aload_0
// 188: aload 6
// 190: iconst_4
// 191: invokeinterface 257 2 0
// 196: invokespecial 567 if:c (Ljava/lang/String;)Ljava/util/Map;
// 199: astore 10
// 201: aload 6
// 203: astore 5
// 205: aload 8
// 207: invokestatic 134 android/text/TextUtils:isEmpty (Ljava/lang/CharSequence;)Z
// 210: ifne +15 -> 225
// 213: aload 6
// 215: astore 5
// 217: aload 9
// 219: invokestatic 134 android/text/TextUtils:isEmpty (Ljava/lang/CharSequence;)Z
// 222: ifeq +78 -> 300
// 225: aload 6
// 227: astore 5
// 229: aload_0
// 230: ldc_w 569
// 233: aload 8
// 235: aload 9
// 237: invokevirtual 572 if:zzc (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
// 240: aload 6
// 242: astore 5
// 244: aload 6
// 246: invokeinterface 218 1 0
// 251: ifne -127 -> 124
// 254: aload 6
// 256: astore 5
// 258: aload 7
// 260: invokeinterface 442 1 0
// 265: iload_1
// 266: if_icmplt +14 -> 280
// 269: aload 6
// 271: astore 5
// 273: aload_0
// 274: ldc_w 574
// 277: invokevirtual 577 if:zzbS (Ljava/lang/String;)V
// 280: aload 6
// 282: ifnull +10 -> 292
// 285: aload 6
// 287: invokeinterface 111 1 0
// 292: aload 7
// 294: areturn
// 295: iconst_0
// 296: istore_2
// 297: goto -128 -> 169
// 300: aload 6
// 302: astore 5
// 304: aload 7
// 306: new 304 com/google/android/gms/internal/zzse
// 309: dup
// 310: lconst_0
// 311: aload 8
// 313: aload 9
// 315: iload_2
// 316: lload_3
// 317: aload 10
// 319: invokespecial 580 com/google/android/gms/internal/zzse:<init> (JLjava/lang/String;Ljava/lang/String;ZJLjava/util/Map;)V
// 322: invokeinterface 215 2 0
// 327: pop
// 328: goto -88 -> 240
// 331: astore 7
// 333: aload 6
// 335: astore 5
// 337: aload 7
// 339: astore 6
// 341: aload_0
// 342: ldc_w 275
// 345: aload 6
// 347: invokevirtual 175 if:zze (Ljava/lang/String;Ljava/lang/Object;)V
// 350: aload 6
// 352: athrow
// 353: astore 6
// 355: aload 5
// 357: ifnull +10 -> 367
// 360: aload 5
// 362: invokeinterface 111 1 0
// 367: aload 6
// 369: athrow
// 370: astore 6
// 372: goto -17 -> 355
// 375: astore 6
// 377: aconst_null
// 378: astore 5
// 380: goto -39 -> 341
// Local variable table:
// start length slot name signature
// 0 383 0 this if
// 28 239 1 i int
// 168 148 2 bool boolean
// 182 135 3 l long
// 19 360 5 localObject1 Object
// 1 350 6 localObject2 Object
// 353 15 6 localObject3 Object
// 370 1 6 localObject4 Object
// 375 1 6 localSQLiteException1 SQLiteException
// 15 290 7 localObject5 Object
// 331 7 7 localSQLiteException2 SQLiteException
// 136 176 8 str1 String
// 150 164 9 str2 String
// 199 119 10 localMap Map
// Exception table:
// from to target type
// 101 110 331 android/database/sqlite/SQLiteException
// 114 124 331 android/database/sqlite/SQLiteException
// 128 138 331 android/database/sqlite/SQLiteException
// 142 152 331 android/database/sqlite/SQLiteException
// 156 167 331 android/database/sqlite/SQLiteException
// 173 183 331 android/database/sqlite/SQLiteException
// 187 201 331 android/database/sqlite/SQLiteException
// 205 213 331 android/database/sqlite/SQLiteException
// 217 225 331 android/database/sqlite/SQLiteException
// 229 240 331 android/database/sqlite/SQLiteException
// 244 254 331 android/database/sqlite/SQLiteException
// 258 269 331 android/database/sqlite/SQLiteException
// 273 280 331 android/database/sqlite/SQLiteException
// 304 328 331 android/database/sqlite/SQLiteException
// 341 353 353 finally
// 21 29 370 finally
// 33 97 370 finally
// 101 110 370 finally
// 114 124 370 finally
// 128 138 370 finally
// 142 152 370 finally
// 156 167 370 finally
// 173 183 370 finally
// 187 201 370 finally
// 205 213 370 finally
// 217 225 370 finally
// 229 240 370 finally
// 244 254 370 finally
// 258 269 370 finally
// 273 280 370 finally
// 304 328 370 finally
// 21 29 375 android/database/sqlite/SQLiteException
// 33 97 375 android/database/sqlite/SQLiteException
}
protected final void zzmS() {}
final class a
extends SQLiteOpenHelper
{
a(Context paramContext, String paramString)
{
super(paramString, null, 1);
}
private static void a(SQLiteDatabase paramSQLiteDatabase)
{
int i = 0;
paramSQLiteDatabase = b(paramSQLiteDatabase, "properties");
while (i < 6)
{
String str = new String[] { "app_uid", "cid", "tid", "params", "adid", "hits_count" }[i];
if (!paramSQLiteDatabase.remove(str))
{
paramSQLiteDatabase = String.valueOf(str);
if (paramSQLiteDatabase.length() != 0) {}
for (paramSQLiteDatabase = "Database properties is missing required column: ".concat(paramSQLiteDatabase);; paramSQLiteDatabase = new String("Database properties is missing required column: ")) {
throw new SQLiteException(paramSQLiteDatabase);
}
}
i += 1;
}
if (!paramSQLiteDatabase.isEmpty()) {
throw new SQLiteException("Database properties table has extra columns");
}
}
/* Error */
private boolean a(SQLiteDatabase paramSQLiteDatabase, String paramString)
{
// Byte code:
// 0: aconst_null
// 1: astore 4
// 3: aload_1
// 4: ldc 72
// 6: iconst_1
// 7: anewarray 25 java/lang/String
// 10: dup
// 11: iconst_0
// 12: ldc 74
// 14: aastore
// 15: ldc 76
// 17: iconst_1
// 18: anewarray 25 java/lang/String
// 21: dup
// 22: iconst_0
// 23: aload_2
// 24: aastore
// 25: aconst_null
// 26: aconst_null
// 27: aconst_null
// 28: invokevirtual 82 android/database/sqlite/SQLiteDatabase:query (Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
// 31: astore_1
// 32: aload_1
// 33: astore 4
// 35: aload 4
// 37: astore_1
// 38: aload 4
// 40: invokeinterface 87 1 0
// 45: istore_3
// 46: aload 4
// 48: ifnull +10 -> 58
// 51: aload 4
// 53: invokeinterface 91 1 0
// 58: iload_3
// 59: ireturn
// 60: astore 5
// 62: aconst_null
// 63: astore 4
// 65: aload 4
// 67: astore_1
// 68: aload_0
// 69: getfield 12 if$a:a Lif;
// 72: ldc 93
// 74: aload_2
// 75: aload 5
// 77: invokevirtual 97 if:zzc (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
// 80: aload 4
// 82: ifnull +10 -> 92
// 85: aload 4
// 87: invokeinterface 91 1 0
// 92: iconst_0
// 93: ireturn
// 94: astore_1
// 95: aload 4
// 97: astore_2
// 98: aload_2
// 99: ifnull +9 -> 108
// 102: aload_2
// 103: invokeinterface 91 1 0
// 108: aload_1
// 109: athrow
// 110: astore 4
// 112: aload_1
// 113: astore_2
// 114: aload 4
// 116: astore_1
// 117: goto -19 -> 98
// 120: astore 5
// 122: goto -57 -> 65
// Local variable table:
// start length slot name signature
// 0 125 0 this a
// 0 125 1 paramSQLiteDatabase SQLiteDatabase
// 0 125 2 paramString String
// 45 14 3 bool boolean
// 1 95 4 localSQLiteDatabase SQLiteDatabase
// 110 5 4 localObject Object
// 60 16 5 localSQLiteException1 SQLiteException
// 120 1 5 localSQLiteException2 SQLiteException
// Exception table:
// from to target type
// 3 32 60 android/database/sqlite/SQLiteException
// 3 32 94 finally
// 38 46 110 finally
// 68 80 110 finally
// 38 46 120 android/database/sqlite/SQLiteException
}
private static Set<String> b(SQLiteDatabase paramSQLiteDatabase, String paramString)
{
HashSet localHashSet = new HashSet();
paramSQLiteDatabase = paramSQLiteDatabase.rawQuery(String.valueOf(paramString).length() + 22 + "SELECT * FROM " + paramString + " LIMIT 0", null);
try
{
paramString = paramSQLiteDatabase.getColumnNames();
int i = 0;
while (i < paramString.length)
{
localHashSet.add(paramString[i]);
i += 1;
}
return localHashSet;
}
finally
{
paramSQLiteDatabase.close();
}
}
public final SQLiteDatabase getWritableDatabase()
{
if (!if.a(if.this).a(3600000L)) {
throw new SQLiteException("Database open failed");
}
try
{
SQLiteDatabase localSQLiteDatabase = super.getWritableDatabase();
return localSQLiteDatabase;
}
catch (SQLiteException localSQLiteException1)
{
if.a(if.this).a();
if.this.zzbT("Opening the database failed, dropping the table and recreating it");
Object localObject = if.b(if.this);
if.this.getContext().getDatabasePath((String)localObject).delete();
try
{
localObject = super.getWritableDatabase();
if.a(if.this).a = 0L;
return (SQLiteDatabase)localObject;
}
catch (SQLiteException localSQLiteException2)
{
if.this.zze("Failed to open freshly created database", localSQLiteException2);
throw localSQLiteException2;
}
}
}
public final void onCreate(SQLiteDatabase paramSQLiteDatabase)
{
zzsv.zzca(paramSQLiteDatabase.getPath());
}
public final void onOpen(SQLiteDatabase paramSQLiteDatabase)
{
int j = 1;
Object localObject;
if (Build.VERSION.SDK_INT < 15) {
localObject = paramSQLiteDatabase.rawQuery("PRAGMA journal_mode=memory", null);
}
for (;;)
{
try
{
((Cursor)localObject).moveToFirst();
((Cursor)localObject).close();
if (!a(paramSQLiteDatabase, "hits2"))
{
paramSQLiteDatabase.execSQL(if.j());
if (a(paramSQLiteDatabase, "properties")) {
break;
}
paramSQLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS properties ( app_uid INTEGER NOT NULL, cid TEXT NOT NULL, tid TEXT NOT NULL, params TEXT NOT NULL, adid INTEGER NOT NULL, hits_count INTEGER NOT NULL, PRIMARY KEY (app_uid, cid, tid)) ;");
return;
}
}
finally
{
((Cursor)localObject).close();
}
localObject = b(paramSQLiteDatabase, "hits2");
int i = 0;
while (i < 4)
{
String str = new String[] { "hit_id", "hit_string", "hit_time", "hit_url" }[i];
if (!((Set)localObject).remove(str))
{
paramSQLiteDatabase = String.valueOf(str);
if (paramSQLiteDatabase.length() != 0) {}
for (paramSQLiteDatabase = "Database hits2 is missing required column: ".concat(paramSQLiteDatabase);; paramSQLiteDatabase = new String("Database hits2 is missing required column: ")) {
throw new SQLiteException(paramSQLiteDatabase);
}
}
i += 1;
}
if (!((Set)localObject).remove("hit_app_id")) {}
for (i = j; !((Set)localObject).isEmpty(); i = 0) {
throw new SQLiteException("Database hits2 has extra columns");
}
if (i != 0) {
paramSQLiteDatabase.execSQL("ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER");
}
}
a(paramSQLiteDatabase);
}
public final void onUpgrade(SQLiteDatabase paramSQLiteDatabase, int paramInt1, int paramInt2) {}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/if.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/