83 lines
2.0 KiB
Smali
83 lines
2.0 KiB
Smali
.class public Lcom/zk/drivermonitor/reciever/SystemStartReceiver;
|
|
.super Landroid/content/BroadcastReceiver;
|
|
.source "SystemStartReceiver.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 10
|
|
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
.locals 2
|
|
|
|
.line 15
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:try_start_0
|
|
const-string v1, "android.intent.action.BOOT_COMPLETED"
|
|
|
|
.line 18
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "android.intent.action.USER_PRESENT"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
:cond_0
|
|
invoke-static {p1}, Lcom/zk/drivermonitor/utils/SPUtil;->a(Landroid/content/Context;)Lcom/zk/drivermonitor/utils/SPUtil;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Lcom/zk/drivermonitor/utils/SPUtil;->s()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "no"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
.line 19
|
|
new-instance p2, Landroid/content/Intent;
|
|
|
|
const-class v0, Lcom/zk/drivermonitor/service/MonitorService;
|
|
|
|
invoke-direct {p2, p1, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
.line 20
|
|
invoke-virtual {p1, p2}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_1
|
|
return-void
|
|
.end method
|