109 lines
2.5 KiB
Smali
109 lines
2.5 KiB
Smali
.class public Lcom/skt/aicloud/speaker/service/receiver/BootReceiver;
|
|
.super Landroid/content/BroadcastReceiver;
|
|
.source "BootReceiver.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final a:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
const-class v0, Lcom/skt/aicloud/speaker/service/receiver/BootReceiver;
|
|
|
|
const-string v0, "BootReceiver"
|
|
|
|
sput-object v0, Lcom/skt/aicloud/speaker/service/receiver/BootReceiver;->a:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-static {}, Lcom/skt/aicloud/speaker/service/api/AladdinServiceManager;->getInstance()Lcom/skt/aicloud/speaker/service/api/AladdinServiceManager;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-virtual {v0, p1}, Lcom/skt/aicloud/speaker/service/api/AladdinServiceManager;->powerOff(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
.locals 4
|
|
|
|
.line 1
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
sget-object v1, Lcom/skt/aicloud/speaker/service/receiver/BootReceiver;->a:Ljava/lang/String;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object p2, v2, v3
|
|
|
|
const-string p2, "onReceive(intent:%s)"
|
|
|
|
invoke-static {p2, v2}, Lcom/skt/aicloud/mobile/service/util/z;->i(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {v1, p2}, Lcom/beyless/android/lib/util/log/BLog;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string p2, "android.intent.action.BOOT_COMPLETED"
|
|
|
|
.line 3
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string p2, "android.intent.action.ACTION_SHUTDOWN"
|
|
|
|
.line 4
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 5
|
|
invoke-virtual {p0, p1}, Lcom/skt/aicloud/speaker/service/receiver/BootReceiver;->a(Landroid/content/Context;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|