-
Notifications
You must be signed in to change notification settings - Fork 11
/
Aaa.smali
423 lines (261 loc) · 11.5 KB
/
Aaa.smali
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
.class public Lcom/microtechmd/cgms/Aaa;
.super Ljava/lang/Object;
.source "Aaa.java"
# static fields
.field public static volatile Instance:Lcom/microtechmd/cgms/Aaa; = null
.field public static final MMOLL_TO_MGDL:D = 18.0182
.field public static volatile bFirstTime:Z
# instance fields
.field private final mContext:Landroid/content/Context;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 22
const/4 v0, 0x1
sput-boolean v0, Lcom/microtechmd/cgms/Aaa;->bFirstTime:Z
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.locals 0
.param p1, "context" # Landroid/content/Context;
.line 25
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 26
iput-object p1, p0, Lcom/microtechmd/cgms/Aaa;->mContext:Landroid/content/Context;
.line 27
return-void
.end method
.method public static g(Landroid/content/Context;)Lcom/microtechmd/cgms/Aaa;
.locals 2
.param p0, "context" # Landroid/content/Context;
.line 30
sget-object v0, Lcom/microtechmd/cgms/Aaa;->Instance:Lcom/microtechmd/cgms/Aaa;
if-nez v0, :cond_1
.line 31
const-class v0, Lcom/microtechmd/cgms/Aaa;
monitor-enter v0
.line 32
:try_start_0
sget-object v1, Lcom/microtechmd/cgms/Aaa;->Instance:Lcom/microtechmd/cgms/Aaa;
if-nez v1, :cond_0
.line 33
new-instance v1, Lcom/microtechmd/cgms/Aaa;
invoke-direct {v1, p0}, Lcom/microtechmd/cgms/Aaa;-><init>(Landroid/content/Context;)V
sput-object v1, Lcom/microtechmd/cgms/Aaa;->Instance:Lcom/microtechmd/cgms/Aaa;
.line 35
:cond_0
monitor-exit v0
goto :goto_0
:catchall_0
move-exception v1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.line 37
:cond_1
:goto_0
sget-object v0, Lcom/microtechmd/cgms/Aaa;->Instance:Lcom/microtechmd/cgms/Aaa;
return-object v0
.end method
.method private static getSlopeName(Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;)Ljava/lang/String;
.locals 1
.param p0, "trend" # Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
.line 81
sget-object v0, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->SUPER_FAST_DOWN:Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
invoke-virtual {p0, v0}, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 82
const-string v0, "DoubleDown"
return-object v0
.line 83
:cond_0
sget-object v0, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->FAST_DOWN:Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
invoke-virtual {p0, v0}, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
.line 84
const-string v0, "SingleDown"
return-object v0
.line 85
:cond_1
sget-object v0, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->DOWN:Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
invoke-virtual {p0, v0}, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
.line 86
const-string v0, "FortyFiveDown"
return-object v0
.line 87
:cond_2
sget-object v0, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->STEADY:Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
invoke-virtual {p0, v0}, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3
.line 88
const-string v0, "Flat"
return-object v0
.line 89
:cond_3
sget-object v0, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->UP:Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
invoke-virtual {p0, v0}, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4
.line 90
const-string v0, "FortyFiveUp"
return-object v0
.line 91
:cond_4
sget-object v0, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->FAST_UP:Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
invoke-virtual {p0, v0}, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_5
.line 92
const-string v0, "SingleUp"
return-object v0
.line 93
:cond_5
sget-object v0, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->SUPER_FAST_UP:Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
invoke-virtual {p0, v0}, Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6
.line 94
const-string v0, "DoubleUp"
return-object v0
.line 96
:cond_6
const-string v0, ""
return-object v0
.end method
# virtual methods
.method public s(Lcom/microtechmd/cgms/manager/model/CgmModel;)V
.locals 11
.param p1, "cgmData" # Lcom/microtechmd/cgms/manager/model/CgmModel;
.line 64
const-string v0, "device"
const-string v1, "sgv"
new-instance v2, Lorg/json/JSONArray;
invoke-direct {v2}, Lorg/json/JSONArray;-><init>()V
.line 65
.local v2, "jSONArray":Lorg/json/JSONArray;
new-instance v3, Lorg/json/JSONObject;
invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V
.line 66
.local v3, "jSONObject":Lorg/json/JSONObject;
new-instance v4, Landroid/content/Intent;
const-string v5, "com.eveningoutpost.dexdrip.NS_EMULATOR"
invoke-direct {v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 67
.local v4, "intent":Landroid/content/Intent;
const/16 v5, 0x20
invoke-virtual {v4, v5}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
.line 68
iget-object v5, p0, Lcom/microtechmd/cgms/Aaa;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v5
const/4 v6, 0x0
invoke-virtual {v5, v4, v6}, Landroid/content/pm/PackageManager;->queryBroadcastReceivers(Landroid/content/Intent;I)Ljava/util/List;
move-result-object v5
invoke-interface {v5}, Ljava/util/List;->isEmpty()Z
move-result v5
const-string v6, "LJW"
if-eqz v5, :cond_0
.line 69
const-string v0, "No xDrip receivers found."
invoke-static {v6, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 70
return-void
.line 72
:cond_0
new-instance v5, Landroid/os/Bundle;
invoke-direct {v5}, Landroid/os/Bundle;-><init>()V
.line 74
.local v5, "bundle":Landroid/os/Bundle;
:try_start_0
invoke-virtual {p1}, Lcom/microtechmd/cgms/manager/model/CgmModel;->getGlucose()Ljava/lang/Float;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/Float;->floatValue()F
move-result v7
float-to-double v7, v7
const-wide v9, 0x403204a8c154c986L # 18.0182
mul-double/2addr v7, v9
invoke-virtual {v3, v1, v7, v8}, Lorg/json/JSONObject;->put(Ljava/lang/String;D)Lorg/json/JSONObject;
.line 75
const-string v7, "direction"
invoke-virtual {p1}, Lcom/microtechmd/cgms/manager/model/CgmModel;->getGlucoseTrend()Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;
move-result-object v8
invoke-static {v8}, Lcom/microtechmd/cgms/Aaa;->getSlopeName(Lcom/microtechmd/cgms/manager/model/CgmModel$GlucoseTrend;)Ljava/lang/String;
move-result-object v8
invoke-virtual {v3, v7, v8}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 76
const-string v7, "\u5fae\u6cf0"
invoke-virtual {v3, v0, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 77
const-string v7, "type"
invoke-virtual {v3, v7, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 78
const-string v1, "date"
invoke-virtual {p1}, Lcom/microtechmd/cgms/manager/model/CgmModel;->getLastHistoryDatetime()Ljava/util/Date;
move-result-object v7
invoke-virtual {v7}, Ljava/util/Date;->getTime()J
move-result-wide v7
invoke-virtual {v3, v1, v7, v8}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
.line 79
const-string v1, "dateString"
new-instance v7, Ljava/text/SimpleDateFormat;
const-string v8, "yyyy-MM-dd HH:mm:ss Z"
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
move-result-object v9
invoke-direct {v7, v8, v9}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
invoke-virtual {p1}, Lcom/microtechmd/cgms/manager/model/CgmModel;->getLastHistoryDatetime()Ljava/util/Date;
move-result-object v7
invoke-virtual {v3, v1, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 80
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
.line 83
.local v1, "stringBuilder":Ljava/lang/StringBuilder;
invoke-virtual {v2, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
.line 84
const-string v7, "action"
const-string v8, "add"
invoke-virtual {v5, v7, v8}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 85
const-string v7, "manongCode"
const-string v8, "magic372manongxyes"
invoke-virtual {v5, v7, v8}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 86
const-string v7, "AIDEXAppPatched"
invoke-virtual {v5, v0, v7}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 87
const-string v0, "collection"
const-string v7, "entries"
invoke-virtual {v5, v0, v7}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 88
const-string v0, "data"
invoke-virtual {v2}, Lorg/json/JSONArray;->toString()Ljava/lang/String;
move-result-object v7
invoke-virtual {v5, v0, v7}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 89
invoke-virtual {v4, v5}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
.line 90
iget-object v0, p0, Lcom/microtechmd/cgms/Aaa;->mContext:Landroid/content/Context;
invoke-virtual {v0, v4}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
.line 93
.end local v1 # "stringBuilder":Ljava/lang/StringBuilder;
goto :goto_0
.line 91
:catch_0
move-exception v0
.line 92
.local v0, "jSONException":Lorg/json/JSONException;
const-string v1, "Unhandled exception"
invoke-static {v6, v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 95
.end local v0 # "jSONException":Lorg/json/JSONException;
:goto_0
return-void
.end method