-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRIL$RILSender.smali
581 lines (364 loc) · 16 KB
/
RIL$RILSender.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
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
.class Lcom/android/internal/telephony/RIL$RILSender;
.super Landroid/os/Handler;
.source "RIL.java"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/telephony/RIL;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = "RILSender"
.end annotation
# instance fields
.field dataLength:[B
.field final synthetic this$0:Lcom/android/internal/telephony/RIL;
# direct methods
.method public constructor <init>(Lcom/android/internal/telephony/RIL;Landroid/os/Looper;)V
.registers 4
.parameter
.parameter "looper"
.prologue
.line 391
iput-object p1, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
.line 392
invoke-direct {p0, p2}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
.line 396
const/4 v0, 0x4
new-array v0, v0, [B
iput-object v0, p0, Lcom/android/internal/telephony/RIL$RILSender;->dataLength:[B
.line 393
return-void
.end method
# virtual methods
.method public handleMessage(Landroid/os/Message;)V
.registers 17
.parameter "msg"
.prologue
.line 409
move-object/from16 v0, p1
iget-object v10, v0, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v10, Lcom/android/internal/telephony/RILRequest;
move-object v8, v10
check-cast v8, Lcom/android/internal/telephony/RILRequest;
.line 410
.local v8, rr:Lcom/android/internal/telephony/RILRequest;
const/4 v7, 0x0
.line 412
.local v7, req:Lcom/android/internal/telephony/RILRequest;
move-object/from16 v0, p1
iget v10, v0, Landroid/os/Message;->what:I
packed-switch v10, :pswitch_data_17a
.line 513
:cond_11
:goto_11
return-void
.line 417
:pswitch_12
:try_start_12
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget-object v9, v10, Lcom/android/internal/telephony/RIL;->mSocket:Landroid/net/LocalSocket;
.line 419
.local v9, s:Landroid/net/LocalSocket;
if-nez v9, :cond_46
.line 420
const/4 v10, 0x1
const/4 v11, 0x0
invoke-virtual {v8, v10, v11}, Lcom/android/internal/telephony/RILRequest;->onError(ILjava/lang/Object;)V
.line 421
invoke-virtual {v8}, Lcom/android/internal/telephony/RILRequest;->release()V
.line 422
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
#calls: Lcom/android/internal/telephony/RIL;->decrementWakeLock()V
invoke-static {v10}, Lcom/android/internal/telephony/RIL;->access$100(Lcom/android/internal/telephony/RIL;)V
:try_end_25
.catch Ljava/io/IOException; {:try_start_12 .. :try_end_25} :catch_26
.catch Ljava/lang/RuntimeException; {:try_start_12 .. :try_end_25} :catch_82
goto :goto_11
.line 451
.end local v9 #s:Landroid/net/LocalSocket;
:catch_26
move-exception v3
.line 452
.local v3, ex:Ljava/io/IOException;
const-string v10, "RILJ"
const-string v11, "IOException"
invoke-static {v10, v11, v3}, Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 453
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget v11, v8, Lcom/android/internal/telephony/RILRequest;->mSerial:I
#calls: Lcom/android/internal/telephony/RIL;->findAndRemoveRequestFromList(I)Lcom/android/internal/telephony/RILRequest;
invoke-static {v10, v11}, Lcom/android/internal/telephony/RIL;->access$200(Lcom/android/internal/telephony/RIL;I)Lcom/android/internal/telephony/RILRequest;
move-result-object v7
.line 456
if-eqz v7, :cond_11
.line 457
const/4 v10, 0x1
const/4 v11, 0x0
invoke-virtual {v8, v10, v11}, Lcom/android/internal/telephony/RILRequest;->onError(ILjava/lang/Object;)V
.line 458
invoke-virtual {v8}, Lcom/android/internal/telephony/RILRequest;->release()V
.line 459
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
#calls: Lcom/android/internal/telephony/RIL;->decrementWakeLock()V
invoke-static {v10}, Lcom/android/internal/telephony/RIL;->access$100(Lcom/android/internal/telephony/RIL;)V
goto :goto_11
.line 426
.end local v3 #ex:Ljava/io/IOException;
.restart local v9 #s:Landroid/net/LocalSocket;
:cond_46
:try_start_46
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget-object v11, v10, Lcom/android/internal/telephony/RIL;->mRequestList:Landroid/util/SparseArray;
monitor-enter v11
:try_end_4b
.catch Ljava/io/IOException; {:try_start_46 .. :try_end_4b} :catch_26
.catch Ljava/lang/RuntimeException; {:try_start_46 .. :try_end_4b} :catch_82
.line 427
:try_start_4b
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget-object v10, v10, Lcom/android/internal/telephony/RIL;->mRequestList:Landroid/util/SparseArray;
iget v12, v8, Lcom/android/internal/telephony/RILRequest;->mSerial:I
invoke-virtual {v10, v12, v8}, Landroid/util/SparseArray;->append(ILjava/lang/Object;)V
.line 428
monitor-exit v11
:try_end_55
.catchall {:try_start_4b .. :try_end_55} :catchall_a3
.line 432
:try_start_55
iget-object v10, v8, Lcom/android/internal/telephony/RILRequest;->mParcel:Landroid/os/Parcel;
invoke-virtual {v10}, Landroid/os/Parcel;->marshall()[B
move-result-object v2
.line 433
.local v2, data:[B
iget-object v10, v8, Lcom/android/internal/telephony/RILRequest;->mParcel:Landroid/os/Parcel;
invoke-virtual {v10}, Landroid/os/Parcel;->recycle()V
.line 434
const/4 v10, 0x0
iput-object v10, v8, Lcom/android/internal/telephony/RILRequest;->mParcel:Landroid/os/Parcel;
.line 436
array-length v10, v2
const/16 v11, 0x2000
if-le v10, v11, :cond_a6
.line 437
new-instance v10, Ljava/lang/RuntimeException;
new-instance v11, Ljava/lang/StringBuilder;
invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V
const-string v12, "Parcel larger than max bytes allowed! "
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v11
array-length v12, v2
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v11
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v11
invoke-direct {v10, v11}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v10
:try_end_82
.catch Ljava/io/IOException; {:try_start_55 .. :try_end_82} :catch_26
.catch Ljava/lang/RuntimeException; {:try_start_55 .. :try_end_82} :catch_82
.line 461
.end local v2 #data:[B
.end local v9 #s:Landroid/net/LocalSocket;
:catch_82
move-exception v4
.line 462
.local v4, exc:Ljava/lang/RuntimeException;
const-string v10, "RILJ"
const-string v11, "Uncaught exception "
invoke-static {v10, v11, v4}, Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 463
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget v11, v8, Lcom/android/internal/telephony/RILRequest;->mSerial:I
#calls: Lcom/android/internal/telephony/RIL;->findAndRemoveRequestFromList(I)Lcom/android/internal/telephony/RILRequest;
invoke-static {v10, v11}, Lcom/android/internal/telephony/RIL;->access$200(Lcom/android/internal/telephony/RIL;I)Lcom/android/internal/telephony/RILRequest;
move-result-object v7
.line 466
if-eqz v7, :cond_11
.line 467
const/4 v10, 0x2
const/4 v11, 0x0
invoke-virtual {v8, v10, v11}, Lcom/android/internal/telephony/RILRequest;->onError(ILjava/lang/Object;)V
.line 468
invoke-virtual {v8}, Lcom/android/internal/telephony/RILRequest;->release()V
.line 469
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
#calls: Lcom/android/internal/telephony/RIL;->decrementWakeLock()V
invoke-static {v10}, Lcom/android/internal/telephony/RIL;->access$100(Lcom/android/internal/telephony/RIL;)V
goto/16 :goto_11
.line 428
.end local v4 #exc:Ljava/lang/RuntimeException;
.restart local v9 #s:Landroid/net/LocalSocket;
:catchall_a3
move-exception v10
:try_start_a4
monitor-exit v11
:try_end_a5
.catchall {:try_start_a4 .. :try_end_a5} :catchall_a3
:try_start_a5
throw v10
.line 443
.restart local v2 #data:[B
:cond_a6
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->dataLength:[B
const/4 v11, 0x0
iget-object v12, p0, Lcom/android/internal/telephony/RIL$RILSender;->dataLength:[B
const/4 v13, 0x1
const/4 v14, 0x0
aput-byte v14, v12, v13
aput-byte v14, v10, v11
.line 444
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->dataLength:[B
const/4 v11, 0x2
array-length v12, v2
shr-int/lit8 v12, v12, 0x8
and-int/lit16 v12, v12, 0xff
int-to-byte v12, v12
aput-byte v12, v10, v11
.line 445
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->dataLength:[B
const/4 v11, 0x3
array-length v12, v2
and-int/lit16 v12, v12, 0xff
int-to-byte v12, v12
aput-byte v12, v10, v11
.line 449
invoke-virtual {v9}, Landroid/net/LocalSocket;->getOutputStream()Ljava/io/OutputStream;
move-result-object v10
iget-object v11, p0, Lcom/android/internal/telephony/RIL$RILSender;->dataLength:[B
invoke-virtual {v10, v11}, Ljava/io/OutputStream;->write([B)V
.line 450
invoke-virtual {v9}, Landroid/net/LocalSocket;->getOutputStream()Ljava/io/OutputStream;
move-result-object v10
invoke-virtual {v10, v2}, Ljava/io/OutputStream;->write([B)V
:try_end_d5
.catch Ljava/io/IOException; {:try_start_a5 .. :try_end_d5} :catch_26
.catch Ljava/lang/RuntimeException; {:try_start_a5 .. :try_end_d5} :catch_82
goto/16 :goto_11
.line 487
.end local v2 #data:[B
.end local v9 #s:Landroid/net/LocalSocket;
:pswitch_d7
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget-object v11, v10, Lcom/android/internal/telephony/RIL;->mRequestList:Landroid/util/SparseArray;
monitor-enter v11
.line 488
:try_start_dc
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
#calls: Lcom/android/internal/telephony/RIL;->clearWakeLock()Z
invoke-static {v10}, Lcom/android/internal/telephony/RIL;->access$300(Lcom/android/internal/telephony/RIL;)Z
move-result v10
if-eqz v10, :cond_144
.line 490
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget-object v10, v10, Lcom/android/internal/telephony/RIL;->mRequestList:Landroid/util/SparseArray;
invoke-virtual {v10}, Landroid/util/SparseArray;->size()I
move-result v1
.line 491
.local v1, count:I
const-string v10, "RILJ"
new-instance v12, Ljava/lang/StringBuilder;
invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
const-string v13, "WAKE_LOCK_TIMEOUT mRequestList="
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v12
invoke-static {v10, v12}, Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 493
const/4 v5, 0x0
.local v5, i:I
:goto_105
if-ge v5, v1, :cond_144
.line 494
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget-object v10, v10, Lcom/android/internal/telephony/RIL;->mRequestList:Landroid/util/SparseArray;
invoke-virtual {v10, v5}, Landroid/util/SparseArray;->valueAt(I)Ljava/lang/Object;
move-result-object v10
move-object v0, v10
check-cast v0, Lcom/android/internal/telephony/RILRequest;
move-object v8, v0
.line 495
const-string v10, "RILJ"
new-instance v12, Ljava/lang/StringBuilder;
invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v12, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v12
const-string v13, ": ["
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v12
iget v13, v8, Lcom/android/internal/telephony/RILRequest;->mSerial:I
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v12
const-string v13, "] "
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v12
iget v13, v8, Lcom/android/internal/telephony/RILRequest;->mRequest:I
invoke-static {v13}, Lcom/android/internal/telephony/RIL;->requestToString(I)Ljava/lang/String;
move-result-object v13
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v12
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v12
invoke-static {v10, v12}, Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 493
add-int/lit8 v5, v5, 0x1
goto :goto_105
.line 500
.end local v1 #count:I
.end local v5 #i:I
:cond_144
monitor-exit v11
goto/16 :goto_11
:catchall_147
move-exception v10
monitor-exit v11
:try_end_149
.catchall {:try_start_dc .. :try_end_149} :catchall_147
throw v10
.line 504
:pswitch_14a
const-string v10, "ril.initPB"
const/4 v11, 0x0
invoke-static {v10, v11}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v10
if-eqz v10, :cond_11
const-string v10, "READY"
const-string v11, "gsm.sim.state"
const-string v12, "Unknown"
invoke-static {v11, v12}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v10
if-eqz v10, :cond_11
.line 506
new-instance v6, Landroid/content/Intent;
const-string v10, "com.samsung.intent.action.PB_SYNC"
invoke-direct {v6, v10}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 507
.local v6, it:Landroid/content/Intent;
iget-object v10, p0, Lcom/android/internal/telephony/RIL$RILSender;->this$0:Lcom/android/internal/telephony/RIL;
iget-object v10, v10, Lcom/android/internal/telephony/BaseCommands;->mContext:Landroid/content/Context;
invoke-virtual {v10, v6}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 508
const-string v10, "RILJ"
const-string v11, "PbInit is detected so send intent for contact sync"
invoke-static {v10, v11}, Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I
goto/16 :goto_11
.line 412
:pswitch_data_17a
.packed-switch 0x1
:pswitch_12
:pswitch_d7
:pswitch_14a
.end packed-switch
.end method
.method public run()V
.registers 1
.prologue
.line 403
return-void
.end method