164 lines
3.6 KiB
Smali
164 lines
3.6 KiB
Smali
.class public Lcom/moji/alarm/MJAlarmManager;
|
|
.super Ljava/lang/Object;
|
|
.source "MJAlarmManager.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/alarm/MJAlarmManager$TriggerType;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 18
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Landroid/app/PendingIntent;)V
|
|
.locals 1
|
|
|
|
const-string v0, "alarm"
|
|
|
|
.line 74
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Landroid/app/AlarmManager;
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 78
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Landroid/app/AlarmManager;->cancel(Landroid/app/PendingIntent;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Lcom/moji/alarm/MJAlarmManager$TriggerType;JLandroid/app/PendingIntent;)V
|
|
.locals 6
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-wide v2, p2
|
|
|
|
move-object v4, p4
|
|
|
|
.line 34
|
|
invoke-static/range {v0 .. v5}, Lcom/moji/alarm/MJAlarmManager;->a(Landroid/content/Context;Lcom/moji/alarm/MJAlarmManager$TriggerType;JLandroid/app/PendingIntent;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Lcom/moji/alarm/MJAlarmManager$TriggerType;JLandroid/app/PendingIntent;Z)V
|
|
.locals 1
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "alarm"
|
|
|
|
.line 47
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Landroid/app/AlarmManager;
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 52
|
|
:cond_0
|
|
:try_start_0
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
if-eqz p5, :cond_1
|
|
|
|
const/16 p5, 0x15
|
|
|
|
if-lt v0, p5, :cond_1
|
|
|
|
.line 54
|
|
new-instance p1, Landroid/app/AlarmManager$AlarmClockInfo;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Landroid/app/AlarmManager$AlarmClockInfo;-><init>(JLandroid/app/PendingIntent;)V
|
|
|
|
invoke-virtual {p0, p1, p4}, Landroid/app/AlarmManager;->setAlarmClock(Landroid/app/AlarmManager$AlarmClockInfo;Landroid/app/PendingIntent;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/16 p5, 0x17
|
|
|
|
if-lt v0, p5, :cond_2
|
|
|
|
.line 57
|
|
invoke-virtual {p1}, Lcom/moji/alarm/MJAlarmManager$TriggerType;->getType()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/app/AlarmManager;->setExact(IJLandroid/app/PendingIntent;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/16 p5, 0x13
|
|
|
|
if-lt v0, p5, :cond_3
|
|
|
|
.line 59
|
|
invoke-virtual {p1}, Lcom/moji/alarm/MJAlarmManager$TriggerType;->getType()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/app/AlarmManager;->setExact(IJLandroid/app/PendingIntent;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 61
|
|
:cond_3
|
|
invoke-virtual {p1}, Lcom/moji/alarm/MJAlarmManager$TriggerType;->getType()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/app/AlarmManager;->set(IJLandroid/app/PendingIntent;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
const-string p1, "MJAlarmManager"
|
|
|
|
.line 64
|
|
invoke-static {p1, p0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|