OnepxReceiver.smali
.class public Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
.super Landroid/content/BroadcastReceiver;
.source "OnepxReceiver.java"
# static fields
.field protected static receiver:Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 14
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
.method public static register1pxReceiver(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 5
.prologue
.line 18
sget-object v0, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->receiver:Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
if-nez v0, :cond_27
.line 19
new-instance v0, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
invoke-direct {v0}, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;-><init>()V
sput-object v0, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->receiver:Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
.line 21
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
sget-object v1, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->receiver:Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "android.intent.action.SCREEN_OFF"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 22
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
sget-object v1, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->receiver:Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "android.intent.action.SCREEN_ON"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 24
:cond_27
return-void
.end method
.method public static unregister1pxReceiver(Lcom/cleanmaster/daemon/KeepLiveParamBuilder;)V
.registers 3
.prologue
.line 27
sget-object v0, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->receiver:Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
if-eqz v0, :cond_e
.line 28
iget-object v0, p0, Lcom/cleanmaster/daemon/KeepLiveParamBuilder;->context:Landroid/content/Context;
sget-object v1, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->receiver:Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
.line 29
const/4 v0, 0x0
sput-object v0, Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;->receiver:Lcom/cleanmaster/daemon/onePxForLive/OnepxReceiver;
.line 31
:cond_e
return-void
.end method
# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.registers 5
.prologue
.line 35
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
const-string v1, "android.intent.action.SCREEN_OFF"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_23
.line 36
new-instance v0, Landroid/content/Intent;
const-class v1, Lcom/cleanmaster/daemon/onePxForLive/OnepxActivity;
invoke-direct {v0, p1, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 37
const/high16 v1, 0x10000000
invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
.line 38
invoke-virtual {p1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 39
const-string v0, "===onepx=="
const-string v1, "1px--screen off-"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
.line 44
:cond_22
:goto_22
return-void
.line 40
:cond_23
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
const-string v1, "android.intent.action.SCREEN_ON"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_22
.line 41
new-instance v0, Landroid/content/Intent;
const-string v1, "finish activity"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
invoke-virtual {p1, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 42
const-string v0, "===onepx=="
const-string v1, "1px--screen on-"
invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->w(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_22
.end method