AlarmReceiver.java
2.5 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
package com.arellomobile.android.push;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.arellomobile.android.push.utils.GeneralUtils;
import java.util.Calendar;
public class AlarmReceiver
extends BroadcastReceiver
{
private static int a = 0;
public static void clearAlarm(Context paramContext)
{
int i = 0;
while (i < 10)
{
PendingIntent localPendingIntent = PendingIntent.getBroadcast(paramContext, i, new Intent(paramContext, AlarmReceiver.class), 134217728);
((AlarmManager)paramContext.getSystemService("alarm")).cancel(localPendingIntent);
i += 1;
}
}
public static void setAlarm(Context paramContext, String paramString, Bundle paramBundle, int paramInt)
{
Calendar localCalendar = Calendar.getInstance();
localCalendar.add(13, paramInt);
Intent localIntent = new Intent(paramContext, AlarmReceiver.class);
localIntent.putExtra("title", paramString);
localIntent.putExtra("local", true);
if (paramBundle != null) {
localIntent.putExtras(paramBundle);
}
paramInt = a;
a = paramInt + 1;
paramString = PendingIntent.getBroadcast(paramContext, paramInt, localIntent, 134217728);
if (a == 10) {
a = 0;
}
((AlarmManager)paramContext.getSystemService("alarm")).set(0, localCalendar.getTimeInMillis(), paramString);
}
public void onReceive(Context paramContext, Intent paramIntent)
{
Intent localIntent1;
if (GeneralUtils.isAmazonDevice())
{
localIntent1 = new Intent(paramContext, PushAmazonIntentService.class);
localIntent1.setAction("com.amazon.device.messaging.intent.RECEIVE");
}
for (;;)
{
localIntent1.putExtras(paramIntent.getExtras());
paramContext.startService(localIntent1);
return;
try
{
localIntent1 = new Intent(paramContext, Class.forName(PushServiceHelper.getPushServiceClassName(paramContext)));
localIntent1.setAction("com.google.android.c2dm.intent.RECEIVE");
}
catch (ClassNotFoundException localClassNotFoundException)
{
for (;;)
{
Intent localIntent2 = new Intent(paramContext, PushGCMIntentService.class);
}
}
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/arellomobile/android/push/AlarmReceiver.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/