218 lines
5.7 KiB
Smali
218 lines
5.7 KiB
Smali
.class public Lcom/moji/mjweather/voice/AlarmAlertActivity;
|
|
.super Lcom/moji/mjweather/voice/AlarmAlertFullScreenActivity;
|
|
.source "AlarmAlertActivity.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private b:I
|
|
|
|
.field private final c:Landroid/os/Handler;
|
|
|
|
.field private final i:Landroid/content/BroadcastReceiver;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 18
|
|
invoke-direct {p0}, Lcom/moji/mjweather/voice/AlarmAlertFullScreenActivity;-><init>()V
|
|
|
|
.line 25
|
|
new-instance v0, Lcom/moji/mjweather/voice/AlarmAlertActivity$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/moji/mjweather/voice/AlarmAlertActivity$1;-><init>(Lcom/moji/mjweather/voice/AlarmAlertActivity;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/voice/AlarmAlertActivity;->c:Landroid/os/Handler;
|
|
|
|
.line 32
|
|
new-instance v0, Lcom/moji/mjweather/voice/AlarmAlertActivity$2;
|
|
|
|
invoke-direct {v0, p0}, Lcom/moji/mjweather/voice/AlarmAlertActivity$2;-><init>(Lcom/moji/mjweather/voice/AlarmAlertActivity;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/voice/AlarmAlertActivity;->i:Landroid/content/BroadcastReceiver;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Landroid/app/KeyguardManager;)V
|
|
.locals 3
|
|
|
|
.line 69
|
|
invoke-virtual {p1}, Landroid/app/KeyguardManager;->inKeyguardRestrictedInputMode()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/moji/mjweather/voice/AlarmAlertActivity;->a()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "AlarmAlertActivity"
|
|
|
|
const-string v1, "handleScreenOff not inKeyguardRestrictedInputMode"
|
|
|
|
.line 70
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 71
|
|
invoke-direct {p0}, Lcom/moji/mjweather/voice/AlarmAlertActivity;->a()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 72
|
|
iget-object v0, p0, Lcom/moji/mjweather/voice/AlarmAlertActivity;->c:Landroid/os/Handler;
|
|
|
|
iget-object v1, p0, Lcom/moji/mjweather/voice/AlarmAlertActivity;->c:Landroid/os/Handler;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v1, v2, p1}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
|
|
|
|
move-result-object p1
|
|
|
|
const-wide/16 v1, 0x1f4
|
|
|
|
invoke-virtual {v0, p1, v1, v2}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string p1, "AlarmAlertActivity"
|
|
|
|
const-string v0, "handleScreenOff inKeyguardRestrictedInputMode or retry count over"
|
|
|
|
.line 75
|
|
invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 77
|
|
new-instance p1, Landroid/content/Intent;
|
|
|
|
const-class v0, Lcom/moji/mjweather/voice/AlarmAlertFullScreenActivity;
|
|
|
|
invoke-direct {p1, p0, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
const-string v0, "intent.extra.alarm"
|
|
|
|
.line 78
|
|
iget-object v1, p0, Lcom/moji/mjweather/voice/AlarmAlertActivity;->a:Lcom/moji/alarm/clock/AlarmClockData;
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
const-string v0, "screen_off"
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 79
|
|
invoke-virtual {p1, v0, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
.line 80
|
|
invoke-virtual {p0, p1}, Lcom/moji/mjweather/voice/AlarmAlertActivity;->startActivity(Landroid/content/Intent;)V
|
|
|
|
.line 81
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/voice/AlarmAlertActivity;->finish()V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/mjweather/voice/AlarmAlertActivity;Landroid/app/KeyguardManager;)V
|
|
.locals 0
|
|
|
|
.line 18
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/voice/AlarmAlertActivity;->a(Landroid/app/KeyguardManager;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a()Z
|
|
.locals 2
|
|
|
|
.line 61
|
|
iget v0, p0, Lcom/moji/mjweather/voice/AlarmAlertActivity;->b:I
|
|
|
|
add-int/lit8 v1, v0, 0x1
|
|
|
|
iput v1, p0, Lcom/moji/mjweather/voice/AlarmAlertActivity;->b:I
|
|
|
|
const/4 v1, 0x5
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const-string v0, "AlarmAlertActivity"
|
|
|
|
const-string v1, "Tried to read keyguard status too many times, bailing..."
|
|
|
|
.line 62
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected onCreate(Landroid/os/Bundle;)V
|
|
.locals 1
|
|
|
|
.line 42
|
|
invoke-super {p0, p1}, Lcom/moji/mjweather/voice/AlarmAlertFullScreenActivity;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
const-string p1, "AlarmAlertActivity"
|
|
|
|
const-string v0, "AlarmAlertActivity onCreate"
|
|
|
|
.line 43
|
|
invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 47
|
|
invoke-virtual {p0, p1}, Lcom/moji/mjweather/voice/AlarmAlertActivity;->setFinishOnTouchOutside(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDestroy()V
|
|
.locals 2
|
|
|
|
.line 52
|
|
invoke-super {p0}, Lcom/moji/mjweather/voice/AlarmAlertFullScreenActivity;->onDestroy()V
|
|
|
|
const-string v0, "AlarmAlertActivity"
|
|
|
|
const-string v1, "AlarmAlertActivity onDestroy"
|
|
|
|
.line 53
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 56
|
|
iget-object v0, p0, Lcom/moji/mjweather/voice/AlarmAlertActivity;->c:Landroid/os/Handler;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V
|
|
|
|
return-void
|
|
.end method
|