hl.java
2.99 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
import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.os.AsyncTask;
import android.support.annotation.UiThread;
import android.support.annotation.VisibleForTesting;
import com.bitstrips.imoji.persistence.MediaCacheTable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public final class hl
{
public final SQLiteDatabase a;
final hj b;
public ArrayList<hk> c = new ArrayList();
public boolean d = false;
public AsyncTask e = null;
public hl(SQLiteDatabase paramSQLiteDatabase, hj paramhj)
{
this.a = paramSQLiteDatabase;
this.b = paramhj;
}
@UiThread
final void a()
{
ArrayList localArrayList = this.c;
this.e = new hl.a().execute(new List[] { localArrayList });
this.c = new ArrayList();
}
@UiThread
public final void a(hk paramhk)
{
if (this.d) {}
do
{
return;
this.c.add(paramhk);
} while (this.e != null);
a();
}
@VisibleForTesting
final class a
extends AsyncTask<List<hk>, Void, Void>
{
a() {}
private Void a(List<hk>... paramVarArgs)
{
paramVarArgs = paramVarArgs[0];
hl.this.a.beginTransaction();
for (;;)
{
try
{
paramVarArgs = paramVarArgs.iterator();
if (!paramVarArgs.hasNext()) {
break label263;
}
localObject1 = (hk)paramVarArgs.next();
switch (hl.1.a[(localObject1.a - 1)])
{
case 1:
localObject2 = hl.this.b;
localSQLiteDatabase = hl.this.a;
str = ((hk)localObject1).b;
localObject1 = ((hk)localObject1).c;
ContentValues localContentValues = new ContentValues();
localContentValues.put("cache_key", str);
localContentValues.put("url", (String)localObject1);
localSQLiteDatabase.replace(((hj)localObject2).a.getName(), null, localContentValues);
break;
case 2:
localObject2 = hl.this.b;
}
}
catch (SQLiteException paramVarArgs)
{
hl.this.a.endTransaction();
return null;
}
SQLiteDatabase localSQLiteDatabase = hl.this.a;
Object localObject1 = ((hk)localObject1).b;
String str = String.format("%s = ?", new Object[] { "cache_key" });
localSQLiteDatabase.delete(((hj)localObject2).a.getName(), str, new String[] { localObject1 });
continue;
localObject1 = hl.this.b;
Object localObject2 = hl.this.a;
try
{
((SQLiteDatabase)localObject2).delete(((hj)localObject1).a.getName(), null, null);
}
catch (SQLiteException localSQLiteException) {}
continue;
label263:
hl.this.a.setTransactionSuccessful();
}
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/hl.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/