h.smali
8.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
384
385
386
387
.class public Lcom/uyumao/h;
.super Landroid/content/BroadcastReceiver;
# instance fields
.field public a:J
# direct methods
.method public constructor <init>()V
.locals 2
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/uyumao/h;->a:J
return-void
.end method
# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 13
const-string v0, "android.net.conn.CONNECTIVITY_CHANGE"
:try_start_0
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object p2
invoke-virtual {v0, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_8
const-string p2, "android.permission.ACCESS_NETWORK_STATE"
invoke-static {p1, p2}, Lcom/uyumao/e;->a(Landroid/content/Context;Ljava/lang/String;)Z
move-result p2
if-nez p2, :cond_0
return-void
:cond_0
const-string p2, "connectivity"
invoke-virtual {p1, p2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object p2
check-cast p2, Landroid/net/ConnectivityManager;
const/4 v0, 0x1
invoke-virtual {p2, v0}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object v1
const/4 v2, 0x0
invoke-virtual {p2, v2}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object p2
invoke-virtual {v1}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v3
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_3
const-wide/16 v4, 0x1f4
const-wide/16 v6, 0x0
const-string v8, "NetChangeReceiver"
const/4 v9, 0x0
if-eqz v3, :cond_2
:try_start_1
invoke-virtual {p2}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v3
if-eqz v3, :cond_2
iget-wide v10, p0, Lcom/uyumao/h;->a:J
cmp-long v1, v10, v6
if-ltz v1, :cond_1
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
iget-wide v10, p0, Lcom/uyumao/h;->a:J
sub-long/2addr v6, v10
cmp-long v1, v6, v4
if-gtz v1, :cond_1
return-void
:cond_1
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v3
iput-wide v3, p0, Lcom/uyumao/h;->a:J
const-string v1, "WIFI\u5df2\u8fde\u63a5,\u79fb\u52a8\u6570\u636e\u5df2\u8fde\u63a5"
invoke-static {v8, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
const/4 v1, 0x3
invoke-static {p1}, Lcom/uyumao/e;->g(Landroid/content/Context;)[Ljava/lang/String;
move-result-object v3
aget-object v2, v3, v2
aget-object v0, v3, v0
invoke-static {p2}, Lcom/uyumao/e;->a(Landroid/net/NetworkInfo;)Ljava/lang/String;
move-result-object p2
goto :goto_0
:cond_2
invoke-virtual {v1}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v3
if-nez v3, :cond_3
invoke-virtual {p2}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v3
if-eqz v3, :cond_3
const-string v0, "WIFI\u5df2\u65ad\u5f00,\u79fb\u52a8\u6570\u636e\u5df2\u8fde\u63a5"
invoke-static {v8, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
const/4 v0, 0x2
invoke-static {p2}, Lcom/uyumao/e;->a(Landroid/net/NetworkInfo;)Ljava/lang/String;
move-result-object p2
move v1, v0
move-object v0, v9
move-object v2, v0
:goto_0
invoke-static {p1}, Lcom/uyumao/e;->d(Landroid/content/Context;)Ljava/lang/String;
move-result-object v3
move-object v12, v2
move-object v2, p2
move-object p2, v0
move v0, v1
move-object v1, v12
goto :goto_2
:cond_3
invoke-virtual {v1}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v1
if-eqz v1, :cond_5
invoke-virtual {p2}, Landroid/net/NetworkInfo;->isConnected()Z
move-result p2
if-nez p2, :cond_5
iget-wide v10, p0, Lcom/uyumao/h;->a:J
cmp-long p2, v10, v6
if-ltz p2, :cond_4
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
iget-wide v10, p0, Lcom/uyumao/h;->a:J
sub-long/2addr v6, v10
cmp-long p2, v6, v4
if-gtz p2, :cond_4
return-void
:cond_4
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v3
iput-wide v3, p0, Lcom/uyumao/h;->a:J
const-string p2, "WIFI\u5df2\u8fde\u63a5,\u79fb\u52a8\u6570\u636e\u5df2\u65ad\u5f00"
invoke-static {v8, p2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
invoke-static {p1}, Lcom/uyumao/e;->g(Landroid/content/Context;)[Ljava/lang/String;
move-result-object p2
aget-object v1, p2, v2
aget-object p2, p2, v0
move-object v2, v9
goto :goto_1
:cond_5
const-string p2, "WIFI\u5df2\u65ad\u5f00,\u79fb\u52a8\u6570\u636e\u5df2\u65ad\u5f00"
invoke-static {v8, p2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_3
move v0, v2
move-object p2, v9
move-object v1, p2
move-object v2, v1
:goto_1
move-object v3, v2
:goto_2
:try_start_2
new-instance v4, Lorg/json/JSONObject;
invoke-direct {v4}, Lorg/json/JSONObject;-><init>()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
:try_start_3
const-string v5, "type"
invoke-virtual {v4, v5, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_6
invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_6
const-string v0, "wifi_ssid"
invoke-virtual {v4, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
const-string v0, "wifi_bssid"
invoke-virtual {v4, v0, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
:cond_6
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result p2
if-nez p2, :cond_7
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result p2
if-nez p2, :cond_7
const-string p2, "mobile_type"
invoke-virtual {v4, p2, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
const-string p2, "mobile_carrier"
invoke-virtual {v4, p2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:cond_7
const-string p2, "systemtime"
:try_start_4
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
invoke-virtual {v4, p2, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
goto :goto_4
:catchall_0
move-exception p2
goto :goto_3
:catchall_1
move-exception p2
move-object v4, v9
:goto_3
:try_start_5
invoke-virtual {p2}, Ljava/lang/Throwable;->printStackTrace()V
:goto_4
if-eqz v4, :cond_8
invoke-virtual {v4}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
move-result-object p2
invoke-static {v8, p2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_3
:try_start_6
invoke-static {}, Lcom/uyumao/l;->a()Lcom/uyumao/l;
move-result-object p2
invoke-virtual {p2}, Lcom/uyumao/l;->b()Ljava/util/concurrent/ExecutorService;
move-result-object p2
new-instance v0, Lcom/uyumao/h$a;
invoke-direct {v0, p0, p1, v4}, Lcom/uyumao/h$a;-><init>(Lcom/uyumao/h;Landroid/content/Context;Lorg/json/JSONObject;)V
invoke-interface {p2, v0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_2
goto :goto_5
:catchall_2
move-exception p1
:try_start_7
invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_3
:catchall_3
:cond_8
:goto_5
return-void
.end method