kg$b.java
5.97 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
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.os.Build.VERSION;
import com.google.android.gms.common.util.zze;
import java.io.File;
import java.util.HashSet;
import java.util.Set;
final class kg$b
extends SQLiteOpenHelper
{
private boolean b;
private long c = 0L;
kg$b(kg paramkg, Context paramContext, String paramString)
{
super(paramContext, paramString, null, 1);
}
/* Error */
private static boolean a(String paramString, SQLiteDatabase paramSQLiteDatabase)
{
// Byte code:
// 0: aconst_null
// 1: astore_3
// 2: aload_1
// 3: ldc 27
// 5: iconst_1
// 6: anewarray 29 java/lang/String
// 9: dup
// 10: iconst_0
// 11: ldc 31
// 13: aastore
// 14: ldc 33
// 16: iconst_1
// 17: anewarray 29 java/lang/String
// 20: dup
// 21: iconst_0
// 22: aload_0
// 23: aastore
// 24: aconst_null
// 25: aconst_null
// 26: aconst_null
// 27: invokevirtual 39 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;
// 30: astore_1
// 31: aload_1
// 32: invokeinterface 45 1 0
// 37: istore_2
// 38: aload_1
// 39: ifnull +9 -> 48
// 42: aload_1
// 43: invokeinterface 49 1 0
// 48: iload_2
// 49: ireturn
// 50: astore_1
// 51: aconst_null
// 52: astore_1
// 53: aload_0
// 54: invokestatic 53 java/lang/String:valueOf (Ljava/lang/Object;)Ljava/lang/String;
// 57: astore_0
// 58: aload_0
// 59: invokevirtual 57 java/lang/String:length ()I
// 62: ifeq +26 -> 88
// 65: ldc 59
// 67: aload_0
// 68: invokevirtual 63 java/lang/String:concat (Ljava/lang/String;)Ljava/lang/String;
// 71: astore_0
// 72: aload_0
// 73: invokestatic 69 com/google/android/gms/tagmanager/zzbo:zzbh (Ljava/lang/String;)V
// 76: aload_1
// 77: ifnull +9 -> 86
// 80: aload_1
// 81: invokeinterface 49 1 0
// 86: iconst_0
// 87: ireturn
// 88: new 29 java/lang/String
// 91: dup
// 92: ldc 59
// 94: invokespecial 71 java/lang/String:<init> (Ljava/lang/String;)V
// 97: astore_0
// 98: goto -26 -> 72
// 101: astore_0
// 102: aload_1
// 103: ifnull +9 -> 112
// 106: aload_1
// 107: invokeinterface 49 1 0
// 112: aload_0
// 113: athrow
// 114: astore_0
// 115: aload_3
// 116: astore_1
// 117: goto -15 -> 102
// 120: astore_0
// 121: goto -19 -> 102
// 124: astore_3
// 125: goto -72 -> 53
// Local variable table:
// start length slot name signature
// 0 128 0 paramString String
// 0 128 1 paramSQLiteDatabase SQLiteDatabase
// 37 12 2 bool boolean
// 1 115 3 localObject Object
// 124 1 3 localSQLiteException SQLiteException
// Exception table:
// from to target type
// 2 31 50 android/database/sqlite/SQLiteException
// 53 72 101 finally
// 72 76 101 finally
// 88 98 101 finally
// 2 31 114 finally
// 31 38 120 finally
// 31 38 124 android/database/sqlite/SQLiteException
}
public final SQLiteDatabase getWritableDatabase()
{
if ((this.b) && (this.c + 3600000L > kg.a(this.a).currentTimeMillis())) {
throw new SQLiteException("Database creation failed");
}
Object localObject1 = null;
this.b = true;
this.c = kg.a(this.a).currentTimeMillis();
try
{
localObject2 = super.getWritableDatabase();
localObject1 = localObject2;
}
catch (SQLiteException localSQLiteException)
{
for (;;)
{
Object localObject2;
kg.c(this.a).getDatabasePath(kg.b(this.a)).delete();
}
}
localObject2 = localObject1;
if (localObject1 == null) {
localObject2 = super.getWritableDatabase();
}
this.b = false;
return (SQLiteDatabase)localObject2;
}
public final void onCreate(SQLiteDatabase paramSQLiteDatabase)
{
ix.a(paramSQLiteDatabase.getPath());
}
public final void onOpen(SQLiteDatabase paramSQLiteDatabase)
{
Object localObject1;
if (Build.VERSION.SDK_INT < 15) {
localObject1 = paramSQLiteDatabase.rawQuery("PRAGMA journal_mode=memory", null);
}
do
{
try
{
((Cursor)localObject1).moveToFirst();
((Cursor)localObject1).close();
if (!a("gtm_hits", paramSQLiteDatabase))
{
paramSQLiteDatabase.execSQL(kg.b());
return;
}
}
finally
{
((Cursor)localObject1).close();
}
paramSQLiteDatabase = paramSQLiteDatabase.rawQuery("SELECT * FROM gtm_hits WHERE 0", null);
localObject1 = new HashSet();
try
{
String[] arrayOfString = paramSQLiteDatabase.getColumnNames();
int i = 0;
while (i < arrayOfString.length)
{
((Set)localObject1).add(arrayOfString[i]);
i += 1;
}
paramSQLiteDatabase.close();
if ((!((Set)localObject1).remove("hit_id")) || (!((Set)localObject1).remove("hit_url")) || (!((Set)localObject1).remove("hit_time")) || (!((Set)localObject1).remove("hit_first_send_time"))) {
throw new SQLiteException("Database column missing");
}
}
finally
{
paramSQLiteDatabase.close();
}
} while (((Set)localObject2).isEmpty());
throw new SQLiteException("Database has extra columns");
}
public final void onUpgrade(SQLiteDatabase paramSQLiteDatabase, int paramInt1, int paramInt2) {}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/kg$b.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/