UYMManager.smali
9.6 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
.class public Lcom/uyumao/sdk/UYMManager;
.super Ljava/lang/Object;
# static fields
.field public static a:Lcom/uyumao/sdk/UYMManager;
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static enableYm1(Landroid/content/Context;Z)V
.locals 0
sput-boolean p1, Lcom/uyumao/d;->a:Z
return-void
.end method
.method public static enableYm2(Landroid/content/Context;Z)V
.locals 0
sput-boolean p1, Lcom/uyumao/d;->b:Z
return-void
.end method
.method public static enableYm3(Landroid/content/Context;Z)V
.locals 0
sput-boolean p1, Lcom/uyumao/d;->c:Z
return-void
.end method
.method public static enableYm4(Landroid/content/Context;Z)V
.locals 0
sput-boolean p1, Lcom/uyumao/d;->d:Z
return-void
.end method
.method public static enableYm5(Landroid/content/Context;Z)V
.locals 0
sput-boolean p1, Lcom/uyumao/d;->e:Z
return-void
.end method
.method public static enableYm6(Landroid/content/Context;Z)V
.locals 0
sput-boolean p1, Lcom/uyumao/d;->f:Z
return-void
.end method
.method public static declared-synchronized getInstance()Lcom/uyumao/sdk/UYMManager;
.locals 2
const-class v0, Lcom/uyumao/sdk/UYMManager;
monitor-enter v0
:try_start_0
sget-object v1, Lcom/uyumao/sdk/UYMManager;->a:Lcom/uyumao/sdk/UYMManager;
if-nez v1, :cond_0
new-instance v1, Lcom/uyumao/sdk/UYMManager;
invoke-direct {v1}, Lcom/uyumao/sdk/UYMManager;-><init>()V
sput-object v1, Lcom/uyumao/sdk/UYMManager;->a:Lcom/uyumao/sdk/UYMManager;
:cond_0
sget-object v1, Lcom/uyumao/sdk/UYMManager;->a:Lcom/uyumao/sdk/UYMManager;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit v0
return-object v1
:catchall_0
move-exception v1
monitor-exit v0
throw v1
.end method
.method public static getSdkVersion()Ljava/lang/String;
.locals 1
const-string v0, "1.1.2"
return-object v0
.end method
.method public static processEvent(Landroid/content/Context;Ljava/lang/String;)V
.locals 2
const-string v0, "actionName"
sget-boolean v1, Lcom/uyumao/d;->a:Z
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v1
sput-object v1, Lcom/uyumao/d;->g:Landroid/content/Context;
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_0
goto :goto_0
:cond_0
:try_start_0
new-instance v1, Lorg/json/JSONObject;
invoke-direct {v1, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
move-result p1
if-eqz p1, :cond_1
invoke-virtual {v1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
sget-object v0, Lcom/uyumao/d;->m:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Integer;
if-eqz p1, :cond_1
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
sget-object v0, Lcom/uyumao/d$e;->a:Lcom/uyumao/d;
invoke-static {p0, p1, v0, v1}, Lcom/uyumao/g;->a(Landroid/content/Context;ILcom/uyumao/g$a;Ljava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:catchall_0
:cond_1
:goto_0
return-void
.end method
# virtual methods
.method public declared-synchronized init(Landroid/content/Context;)V
.locals 7
monitor-enter p0
if-nez p1, :cond_0
monitor-exit p0
return-void
:cond_0
:try_start_0
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v0
sget-boolean v1, Lcom/uyumao/c;->a:Z
const/4 v2, 0x1
const/4 v3, 0x0
if-eqz v1, :cond_1
goto :goto_1
:cond_1
sput-boolean v2, Lcom/uyumao/c;->a:Z
const-string v1, "uyumao_info"
invoke-virtual {v0, v1, v3}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v1
new-instance v4, Ljava/text/SimpleDateFormat;
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
move-result-object v5
const-string v6, "yyyyMMdd"
invoke-direct {v4, v6, v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
new-instance v5, Ljava/util/Date;
invoke-direct {v5}, Ljava/util/Date;-><init>()V
invoke-virtual {v4, v5}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v4
invoke-interface {v1, v4, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result v1
if-eqz v1, :cond_2
new-instance v1, Ljava/lang/Thread;
new-instance v4, Lcom/uyumao/a;
invoke-direct {v4, v0}, Lcom/uyumao/a;-><init>(Landroid/content/Context;)V
invoke-direct {v1, v4}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V
invoke-virtual {v1}, Ljava/lang/Thread;->start()V
goto :goto_0
:cond_2
new-instance v1, Lcom/uyumao/b;
invoke-direct {v1, v0}, Lcom/uyumao/b;-><init>(Landroid/content/Context;)V
invoke-static {}, Lcom/uyumao/l;->a()Lcom/uyumao/l;
move-result-object v4
invoke-virtual {v4}, Lcom/uyumao/l;->b()Ljava/util/concurrent/ExecutorService;
move-result-object v4
invoke-interface {v4, v1}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_3
:goto_0
:try_start_1
sget-object v1, Lcom/uyumao/c;->b:Lcom/uyumao/h;
if-eqz v1, :cond_3
invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
:cond_3
new-instance v1, Lcom/uyumao/h;
invoke-direct {v1}, Lcom/uyumao/h;-><init>()V
sput-object v1, Lcom/uyumao/c;->b:Lcom/uyumao/h;
new-instance v1, Landroid/content/IntentFilter;
invoke-direct {v1}, Landroid/content/IntentFilter;-><init>()V
const-string v4, "android.net.conn.CONNECTIVITY_CHANGE"
invoke-virtual {v1, v4}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
sget-object v4, Lcom/uyumao/c;->b:Lcom/uyumao/h;
invoke-virtual {v0, v4, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
:goto_1
:try_start_2
sput-object p1, Lcom/uyumao/e;->a:Landroid/content/Context;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_3
:try_start_3
const-string p1, "com.umeng.commonsdk.UMConfigure"
invoke-static {p1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object p1
const-string v0, "com.umeng.ccg.ActionInfo"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
:try_start_4
const-string v1, "registerActionInfo"
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_3
:try_start_5
new-array v4, v2, [Ljava/lang/Class;
aput-object v0, v4, v3
invoke-virtual {p1, v1, v4}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object p1
if-eqz p1, :cond_4
goto :goto_2
:cond_4
move v2, v3
:goto_2
if-eqz v2, :cond_5
new-instance p1, Lcom/uyumao/sdk/UYMManager$a;
invoke-direct {p1, p0}, Lcom/uyumao/sdk/UYMManager$a;-><init>(Lcom/uyumao/sdk/UYMManager;)V
invoke-static {p1}, Lcom/umeng/commonsdk/UMConfigure;->registerActionInfo(Lcom/umeng/ccg/ActionInfo;)V
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
:catchall_1
:cond_5
:try_start_6
sget-boolean p1, Lcom/uyumao/d;->f:Z
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_3
if-nez p1, :cond_6
monitor-exit p0
return-void
:cond_6
:try_start_7
sget-object p1, Lcom/uyumao/e;->b:Ljava/lang/ref/WeakReference;
if-eqz p1, :cond_7
invoke-virtual {p1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/util/concurrent/Future;
if-eqz p1, :cond_7
invoke-interface {p1}, Ljava/util/concurrent/Future;->isDone()Z
move-result v0
if-nez v0, :cond_7
invoke-interface {p1}, Ljava/util/concurrent/Future;->isCancelled()Z
move-result p1
if-nez p1, :cond_7
goto :goto_3
:cond_7
new-instance p1, Lcom/uyumao/q;
invoke-direct {p1}, Lcom/uyumao/q;-><init>()V
invoke-static {p1}, Lcom/uyumao/s;->a(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
move-result-object p1
new-instance v0, Ljava/lang/ref/WeakReference;
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
sput-object v0, Lcom/uyumao/e;->b:Ljava/lang/ref/WeakReference;
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_2
goto :goto_3
:catchall_2
move-exception p1
:try_start_8
invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V
:try_end_8
.catchall {:try_start_8 .. :try_end_8} :catchall_3
:goto_3
monitor-exit p0
return-void
:catchall_3
move-exception p1
monitor-exit p0
throw p1
.end method