225 lines
5.6 KiB
Smali
225 lines
5.6 KiB
Smali
.class public Lcom/zk/drivermonitor/reciever/ScreenReceiver;
|
|
.super Landroid/content/BroadcastReceiver;
|
|
.source "ScreenReceiver.java"
|
|
|
|
|
|
# instance fields
|
|
.field a:Ljava/lang/String;
|
|
|
|
.field b:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 15
|
|
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
|
|
|
|
const-string v0, "screenOpen"
|
|
|
|
.line 17
|
|
iput-object v0, p0, Lcom/zk/drivermonitor/reciever/ScreenReceiver;->a:Ljava/lang/String;
|
|
|
|
const-string v0, "screenClose"
|
|
|
|
iput-object v0, p0, Lcom/zk/drivermonitor/reciever/ScreenReceiver;->b:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Landroid/content/Context;Ljava/lang/String;)V
|
|
.locals 6
|
|
|
|
.line 52
|
|
invoke-static {p1}, Lcom/zk/drivermonitor/utils/SPUtil;->a(Landroid/content/Context;)Lcom/zk/drivermonitor/utils/SPUtil;
|
|
|
|
move-result-object v0
|
|
|
|
.line 53
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v0}, Lcom/zk/drivermonitor/utils/SPUtil;->j()J
|
|
|
|
move-result-wide v3
|
|
|
|
sub-long/2addr v1, v3
|
|
|
|
.line 54
|
|
invoke-static {p1}, Lcom/zk/drivermonitor/db/TableOperation;->a(Landroid/content/Context;)Lcom/zk/drivermonitor/db/TableOperation;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/zk/drivermonitor/db/TableOperation;->c()I
|
|
|
|
move-result v0
|
|
|
|
const-wide/32 v3, 0x1499700
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
.line 56
|
|
iget-object v5, p0, Lcom/zk/drivermonitor/reciever/ScreenReceiver;->a:Ljava/lang/String;
|
|
|
|
invoke-virtual {p2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
const/16 p2, 0x14
|
|
|
|
if-ge v0, p2, :cond_1
|
|
|
|
cmp-long p2, v1, v3
|
|
|
|
if-ltz p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
cmp-long p2, v1, v3
|
|
|
|
if-ltz p2, :cond_3
|
|
|
|
.line 63
|
|
invoke-static {}, Lcom/zk/drivermonitor/manager/StartUpload;->a()Lcom/zk/drivermonitor/manager/StartUpload;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Lcom/zk/drivermonitor/manager/StartUpload;->b(Landroid/content/Context;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 59
|
|
:cond_1
|
|
:goto_0
|
|
invoke-static {}, Lcom/zk/drivermonitor/manager/StartUpload;->a()Lcom/zk/drivermonitor/manager/StartUpload;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Lcom/zk/drivermonitor/manager/StartUpload;->b(Landroid/content/Context;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 65
|
|
iget-object v0, p0, Lcom/zk/drivermonitor/reciever/ScreenReceiver;->b:Ljava/lang/String;
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
cmp-long p2, v1, v3
|
|
|
|
if-ltz p2, :cond_3
|
|
|
|
.line 69
|
|
invoke-static {}, Lcom/zk/drivermonitor/manager/StartUpload;->a()Lcom/zk/drivermonitor/manager/StartUpload;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Lcom/zk/drivermonitor/manager/StartUpload;->b(Landroid/content/Context;)V
|
|
|
|
:cond_3
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
.locals 2
|
|
|
|
.line 21
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
const-string v0, "android.intent.action.SCREEN_ON"
|
|
|
|
.line 25
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 27
|
|
sget-object p2, Lcom/zk/drivermonitor/utils/Constants;->b:Ljava/lang/String;
|
|
|
|
const-string v0, "------\u5f00\u542f\u5c4f\u5e55-----"
|
|
|
|
invoke-static {p2, v0}, Lcom/zk/drivermonitor/utils/MyLog;->a(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 29
|
|
iget-object p2, p0, Lcom/zk/drivermonitor/reciever/ScreenReceiver;->a:Ljava/lang/String;
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/zk/drivermonitor/reciever/ScreenReceiver;->a(Landroid/content/Context;Ljava/lang/String;)V
|
|
|
|
.line 30
|
|
invoke-static {}, Lcom/zk/drivermonitor/utils/ReceiverUtils;->a()Lcom/zk/drivermonitor/utils/ReceiverUtils;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Lcom/zk/drivermonitor/utils/ReceiverUtils;->b(Landroid/content/Context;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "android.intent.action.SCREEN_OFF"
|
|
|
|
.line 34
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 35
|
|
sget-object p2, Lcom/zk/drivermonitor/utils/Constants;->b:Ljava/lang/String;
|
|
|
|
const-string v0, "------\u5173\u95ed\u5c4f\u5e55-----"
|
|
|
|
invoke-static {p2, v0}, Lcom/zk/drivermonitor/utils/MyLog;->a(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 37
|
|
invoke-static {}, Lcom/zk/drivermonitor/utils/ReceiverUtils;->a()Lcom/zk/drivermonitor/utils/ReceiverUtils;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Lcom/zk/drivermonitor/utils/ReceiverUtils;->a(Landroid/content/Context;)V
|
|
|
|
.line 38
|
|
iget-object p2, p0, Lcom/zk/drivermonitor/reciever/ScreenReceiver;->b:Ljava/lang/String;
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/zk/drivermonitor/reciever/ScreenReceiver;->a(Landroid/content/Context;Ljava/lang/String;)V
|
|
|
|
.line 39
|
|
invoke-static {}, Lcom/zk/drivermonitor/manager/OCInfoManager;->a()Lcom/zk/drivermonitor/manager/OCInfoManager;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, p1, v0}, Lcom/zk/drivermonitor/manager/OCInfoManager;->a(Landroid/content/Context;Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|