GCMBaseIntentService.java
18.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
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
package com.google.android.gcm;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.util.Log;
import java.util.Random;
import java.util.concurrent.TimeUnit;
public abstract class GCMBaseIntentService
extends IntentService
{
public static final String TAG = "GCMBaseIntentService";
private static PowerManager.WakeLock a;
private static final Object b = GCMBaseIntentService.class;
private static int c = 0;
private static final Random d = new Random();
private static final int e = (int)TimeUnit.SECONDS.toMillis(3600L);
private static final String f = Long.toBinaryString(d.nextLong());
protected String mSenderId;
protected GCMBaseIntentService()
{
super(i);
}
static void a(Context paramContext, Intent paramIntent, String paramString)
{
synchronized (b)
{
if (a == null) {
a = ((PowerManager)paramContext.getSystemService("power")).newWakeLock(1, "GCM_LIB");
}
Log.v("GCMBaseIntentService", "Acquiring wakelock");
a.acquire();
paramIntent.setClassName(paramContext, paramString);
paramContext.startService(paramIntent);
return;
}
}
public void onDeletedMessages(Context paramContext, int paramInt) {}
public abstract void onError(Context paramContext, String paramString);
/* Error */
public final void onHandleIntent(Intent arg1)
{
// Byte code:
// 0: aload_0
// 1: invokevirtual 131 com/google/android/gcm/GCMBaseIntentService:getApplicationContext ()Landroid/content/Context;
// 4: astore 5
// 6: aload_1
// 7: invokevirtual 134 android/content/Intent:getAction ()Ljava/lang/String;
// 10: astore 4
// 12: aload 4
// 14: ldc -120
// 16: invokevirtual 142 java/lang/String:equals (Ljava/lang/Object;)Z
// 19: ifeq +320 -> 339
// 22: aload_1
// 23: ldc -112
// 25: invokevirtual 148 android/content/Intent:getStringExtra (Ljava/lang/String;)Ljava/lang/String;
// 28: astore 4
// 30: aload_1
// 31: ldc -106
// 33: invokevirtual 148 android/content/Intent:getStringExtra (Ljava/lang/String;)Ljava/lang/String;
// 36: astore 6
// 38: aload_1
// 39: ldc -104
// 41: invokevirtual 148 android/content/Intent:getStringExtra (Ljava/lang/String;)Ljava/lang/String;
// 44: astore_1
// 45: new 61 java/lang/StringBuilder
// 48: dup
// 49: ldc -102
// 51: invokespecial 66 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
// 54: aload 4
// 56: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 59: ldc -97
// 61: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 64: aload 6
// 66: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 69: ldc -95
// 71: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 74: aload_1
// 75: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 78: pop
// 79: aload 4
// 81: ifnull +53 -> 134
// 84: aload 5
// 86: invokestatic 166 com/google/android/gcm/GCMRegistrar:b (Landroid/content/Context;)V
// 89: aload 5
// 91: aload 4
// 93: invokestatic 170 com/google/android/gcm/GCMRegistrar:setRegistrationId (Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
// 96: pop
// 97: aload_0
// 98: aload 5
// 100: aload 4
// 102: invokevirtual 173 com/google/android/gcm/GCMBaseIntentService:onRegistered (Landroid/content/Context;Ljava/lang/String;)V
// 105: getstatic 23 com/google/android/gcm/GCMBaseIntentService:b Ljava/lang/Object;
// 108: astore_1
// 109: aload_1
// 110: monitorenter
// 111: getstatic 78 com/google/android/gcm/GCMBaseIntentService:a Landroid/os/PowerManager$WakeLock;
// 114: ifnull +552 -> 666
// 117: ldc 8
// 119: ldc -81
// 121: invokestatic 102 android/util/Log:v (Ljava/lang/String;Ljava/lang/String;)I
// 124: pop
// 125: getstatic 78 com/google/android/gcm/GCMBaseIntentService:a Landroid/os/PowerManager$WakeLock;
// 128: invokevirtual 178 android/os/PowerManager$WakeLock:release ()V
// 131: aload_1
// 132: monitorexit
// 133: return
// 134: aload_1
// 135: ifnull +56 -> 191
// 138: aload 5
// 140: invokestatic 166 com/google/android/gcm/GCMRegistrar:b (Landroid/content/Context;)V
// 143: aload_0
// 144: aload 5
// 146: aload 5
// 148: invokestatic 182 com/google/android/gcm/GCMRegistrar:clearRegistrationId (Landroid/content/Context;)Ljava/lang/String;
// 151: invokevirtual 185 com/google/android/gcm/GCMBaseIntentService:onUnregistered (Landroid/content/Context;Ljava/lang/String;)V
// 154: goto -49 -> 105
// 157: astore_1
// 158: getstatic 23 com/google/android/gcm/GCMBaseIntentService:b Ljava/lang/Object;
// 161: astore 4
// 163: aload 4
// 165: monitorenter
// 166: getstatic 78 com/google/android/gcm/GCMBaseIntentService:a Landroid/os/PowerManager$WakeLock;
// 169: ifnull +518 -> 687
// 172: ldc 8
// 174: ldc -81
// 176: invokestatic 102 android/util/Log:v (Ljava/lang/String;Ljava/lang/String;)I
// 179: pop
// 180: getstatic 78 com/google/android/gcm/GCMBaseIntentService:a Landroid/os/PowerManager$WakeLock;
// 183: invokevirtual 178 android/os/PowerManager$WakeLock:release ()V
// 186: aload 4
// 188: monitorexit
// 189: aload_1
// 190: athrow
// 191: ldc -69
// 193: aload 6
// 195: invokevirtual 142 java/lang/String:equals (Ljava/lang/Object;)Z
// 198: ifeq +130 -> 328
// 201: aload_0
// 202: aload 5
// 204: aload 6
// 206: invokevirtual 191 com/google/android/gcm/GCMBaseIntentService:onRecoverableError (Landroid/content/Context;Ljava/lang/String;)Z
// 209: ifeq -104 -> 105
// 212: aload 5
// 214: invokestatic 194 com/google/android/gcm/GCMRegistrar:c (Landroid/content/Context;)I
// 217: istore_2
// 218: iload_2
// 219: iconst_2
// 220: idiv
// 221: istore_3
// 222: getstatic 32 com/google/android/gcm/GCMBaseIntentService:d Ljava/util/Random;
// 225: iload_2
// 226: invokevirtual 198 java/util/Random:nextInt (I)I
// 229: iload_3
// 230: iadd
// 231: istore_3
// 232: new 61 java/lang/StringBuilder
// 235: dup
// 236: ldc -56
// 238: invokespecial 66 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
// 241: iload_3
// 242: invokevirtual 70 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder;
// 245: ldc -54
// 247: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 250: iload_2
// 251: invokevirtual 70 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder;
// 254: ldc -52
// 256: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 259: pop
// 260: new 109 android/content/Intent
// 263: dup
// 264: ldc -50
// 266: invokespecial 207 android/content/Intent:<init> (Ljava/lang/String;)V
// 269: astore_1
// 270: aload_1
// 271: ldc -47
// 273: getstatic 58 com/google/android/gcm/GCMBaseIntentService:f Ljava/lang/String;
// 276: invokevirtual 213 android/content/Intent:putExtra (Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
// 279: pop
// 280: aload 5
// 282: iconst_0
// 283: aload_1
// 284: iconst_0
// 285: invokestatic 219 android/app/PendingIntent:getBroadcast (Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
// 288: astore_1
// 289: aload 5
// 291: ldc -35
// 293: invokevirtual 86 android/content/Context:getSystemService (Ljava/lang/String;)Ljava/lang/Object;
// 296: checkcast 223 android/app/AlarmManager
// 299: iconst_3
// 300: invokestatic 228 android/os/SystemClock:elapsedRealtime ()J
// 303: iload_3
// 304: i2l
// 305: ladd
// 306: aload_1
// 307: invokevirtual 232 android/app/AlarmManager:set (IJLandroid/app/PendingIntent;)V
// 310: iload_2
// 311: getstatic 46 com/google/android/gcm/GCMBaseIntentService:e I
// 314: if_icmpge -209 -> 105
// 317: aload 5
// 319: iload_2
// 320: iconst_2
// 321: imul
// 322: invokestatic 234 com/google/android/gcm/GCMRegistrar:a (Landroid/content/Context;I)V
// 325: goto -220 -> 105
// 328: aload_0
// 329: aload 5
// 331: aload 6
// 333: invokevirtual 236 com/google/android/gcm/GCMBaseIntentService:onError (Landroid/content/Context;Ljava/lang/String;)V
// 336: goto -231 -> 105
// 339: aload 4
// 341: ldc -18
// 343: invokevirtual 142 java/lang/String:equals (Ljava/lang/Object;)Z
// 346: ifeq +185 -> 531
// 349: aload_1
// 350: ldc -16
// 352: invokevirtual 148 android/content/Intent:getStringExtra (Ljava/lang/String;)Ljava/lang/String;
// 355: astore 4
// 357: aload 4
// 359: ifnull +116 -> 475
// 362: aload 4
// 364: ldc -14
// 366: invokevirtual 142 java/lang/String:equals (Ljava/lang/Object;)Z
// 369: ifeq +79 -> 448
// 372: aload_1
// 373: ldc -12
// 375: invokevirtual 148 android/content/Intent:getStringExtra (Ljava/lang/String;)Ljava/lang/String;
// 378: astore_1
// 379: aload_1
// 380: ifnull -275 -> 105
// 383: aload_1
// 384: invokestatic 250 java/lang/Integer:parseInt (Ljava/lang/String;)I
// 387: istore_2
// 388: ldc 8
// 390: new 61 java/lang/StringBuilder
// 393: dup
// 394: ldc -4
// 396: invokespecial 66 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
// 399: iload_2
// 400: invokevirtual 70 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder;
// 403: invokevirtual 74 java/lang/StringBuilder:toString ()Ljava/lang/String;
// 406: invokestatic 102 android/util/Log:v (Ljava/lang/String;Ljava/lang/String;)I
// 409: pop
// 410: aload_0
// 411: aload 5
// 413: iload_2
// 414: invokevirtual 254 com/google/android/gcm/GCMBaseIntentService:onDeletedMessages (Landroid/content/Context;I)V
// 417: goto -312 -> 105
// 420: astore 4
// 422: ldc 8
// 424: new 61 java/lang/StringBuilder
// 427: dup
// 428: ldc_w 256
// 431: invokespecial 66 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
// 434: aload_1
// 435: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 438: invokevirtual 74 java/lang/StringBuilder:toString ()Ljava/lang/String;
// 441: invokestatic 258 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 444: pop
// 445: goto -340 -> 105
// 448: ldc 8
// 450: new 61 java/lang/StringBuilder
// 453: dup
// 454: ldc_w 260
// 457: invokespecial 66 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
// 460: aload 4
// 462: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 465: invokevirtual 74 java/lang/StringBuilder:toString ()Ljava/lang/String;
// 468: invokestatic 258 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 471: pop
// 472: goto -367 -> 105
// 475: aconst_null
// 476: astore 4
// 478: aload 5
// 480: invokestatic 266 com/arellomobile/android/push/utils/PreferenceUtils:getLightScreenOnNotification (Landroid/content/Context;)Z
// 483: ifeq +28 -> 511
// 486: aload_0
// 487: ldc 80
// 489: invokevirtual 267 com/google/android/gcm/GCMBaseIntentService:getSystemService (Ljava/lang/String;)Ljava/lang/Object;
// 492: checkcast 88 android/os/PowerManager
// 495: ldc_w 268
// 498: ldc_w 270
// 501: invokevirtual 94 android/os/PowerManager:newWakeLock (ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;
// 504: astore 4
// 506: aload 4
// 508: invokevirtual 107 android/os/PowerManager$WakeLock:acquire ()V
// 511: aload_0
// 512: aload 5
// 514: aload_1
// 515: invokevirtual 274 com/google/android/gcm/GCMBaseIntentService:onMessage (Landroid/content/Context;Landroid/content/Intent;)V
// 518: aload 4
// 520: ifnull -415 -> 105
// 523: aload 4
// 525: invokevirtual 178 android/os/PowerManager$WakeLock:release ()V
// 528: goto -423 -> 105
// 531: aload 4
// 533: ldc -50
// 535: invokevirtual 142 java/lang/String:equals (Ljava/lang/Object;)Z
// 538: ifeq -433 -> 105
// 541: aload_1
// 542: ldc -47
// 544: invokevirtual 148 android/content/Intent:getStringExtra (Ljava/lang/String;)Ljava/lang/String;
// 547: astore_1
// 548: getstatic 58 com/google/android/gcm/GCMBaseIntentService:f Ljava/lang/String;
// 551: aload_1
// 552: invokevirtual 142 java/lang/String:equals (Ljava/lang/Object;)Z
// 555: ifne +76 -> 631
// 558: ldc 8
// 560: new 61 java/lang/StringBuilder
// 563: dup
// 564: ldc_w 276
// 567: invokespecial 66 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
// 570: aload_1
// 571: invokevirtual 157 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 574: invokevirtual 74 java/lang/StringBuilder:toString ()Ljava/lang/String;
// 577: invokestatic 258 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 580: pop
// 581: getstatic 23 com/google/android/gcm/GCMBaseIntentService:b Ljava/lang/Object;
// 584: astore_1
// 585: aload_1
// 586: monitorenter
// 587: getstatic 78 com/google/android/gcm/GCMBaseIntentService:a Landroid/os/PowerManager$WakeLock;
// 590: ifnull +29 -> 619
// 593: ldc 8
// 595: ldc -81
// 597: invokestatic 102 android/util/Log:v (Ljava/lang/String;Ljava/lang/String;)I
// 600: pop
// 601: getstatic 78 com/google/android/gcm/GCMBaseIntentService:a Landroid/os/PowerManager$WakeLock;
// 604: invokevirtual 178 android/os/PowerManager$WakeLock:release ()V
// 607: aload_1
// 608: monitorexit
// 609: return
// 610: astore 4
// 612: aload_1
// 613: monitorexit
// 614: aload 4
// 616: athrow
// 617: astore_1
// 618: return
// 619: ldc 8
// 621: ldc_w 278
// 624: invokestatic 258 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 627: pop
// 628: goto -21 -> 607
// 631: aload 5
// 633: invokestatic 281 com/google/android/gcm/GCMRegistrar:isRegistered (Landroid/content/Context;)Z
// 636: ifeq +11 -> 647
// 639: aload 5
// 641: invokestatic 283 com/google/android/gcm/GCMRegistrar:a (Landroid/content/Context;)V
// 644: goto -539 -> 105
// 647: aload 5
// 649: iconst_1
// 650: anewarray 138 java/lang/String
// 653: dup
// 654: iconst_0
// 655: aload_0
// 656: getfield 285 com/google/android/gcm/GCMBaseIntentService:mSenderId Ljava/lang/String;
// 659: aastore
// 660: invokestatic 288 com/google/android/gcm/GCMRegistrar:a (Landroid/content/Context;[Ljava/lang/String;)V
// 663: goto -558 -> 105
// 666: ldc 8
// 668: ldc_w 278
// 671: invokestatic 258 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 674: pop
// 675: goto -544 -> 131
// 678: astore 4
// 680: aload_1
// 681: monitorexit
// 682: aload 4
// 684: athrow
// 685: astore_1
// 686: return
// 687: ldc 8
// 689: ldc_w 278
// 692: invokestatic 258 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 695: pop
// 696: goto -510 -> 186
// 699: astore 5
// 701: aload 4
// 703: monitorexit
// 704: aload 5
// 706: athrow
// 707: astore 4
// 709: goto -520 -> 189
// Local variable table:
// start length slot name signature
// 0 712 0 this GCMBaseIntentService
// 217 197 2 i int
// 221 83 3 j int
// 420 41 4 localNumberFormatException NumberFormatException
// 476 56 4 localWakeLock PowerManager.WakeLock
// 610 5 4 localObject2 Object
// 678 24 4 localObject3 Object
// 707 1 4 localException Exception
// 4 644 5 localContext Context
// 699 6 5 localObject4 Object
// 36 296 6 str String
// Exception table:
// from to target type
// 0 79 157 finally
// 84 105 157 finally
// 138 154 157 finally
// 191 325 157 finally
// 328 336 157 finally
// 339 357 157 finally
// 362 379 157 finally
// 383 417 157 finally
// 422 445 157 finally
// 448 472 157 finally
// 478 511 157 finally
// 511 518 157 finally
// 523 528 157 finally
// 531 581 157 finally
// 631 644 157 finally
// 647 663 157 finally
// 383 417 420 java/lang/NumberFormatException
// 587 607 610 finally
// 607 609 610 finally
// 612 614 610 finally
// 619 628 610 finally
// 581 587 617 java/lang/Exception
// 614 617 617 java/lang/Exception
// 111 131 678 finally
// 131 133 678 finally
// 666 675 678 finally
// 680 682 678 finally
// 105 111 685 java/lang/Exception
// 682 685 685 java/lang/Exception
// 166 186 699 finally
// 186 189 699 finally
// 687 696 699 finally
// 701 704 699 finally
// 158 166 707 java/lang/Exception
// 704 707 707 java/lang/Exception
}
public abstract void onMessage(Context paramContext, Intent paramIntent);
public boolean onRecoverableError(Context paramContext, String paramString)
{
return true;
}
public abstract void onRegistered(Context paramContext, String paramString);
public abstract void onUnregistered(Context paramContext, String paramString);
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/android/gcm/GCMBaseIntentService.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/