j.smali
3.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
.class public Lcom/uyumao/j;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/uyumao/j$a;
}
.end annotation
# static fields
.field public static a:Landroid/content/Context;
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public declared-synchronized a()Lcom/uyumao/i;
.locals 11
monitor-enter p0
const/4 v0, 0x0
:try_start_0
new-instance v1, Landroid/content/IntentFilter;
const-string v2, "android.intent.action.BATTERY_CHANGED"
invoke-direct {v1, v2}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
sget-object v2, Lcom/uyumao/j;->a:Landroid/content/Context;
invoke-virtual {v2, v0, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
move-result-object v1
const-string v2, "level"
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v2
const-string v4, "voltage"
invoke-virtual {v1, v4, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v4
const-string v5, "temperature"
invoke-virtual {v1, v5, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v5
const-string v6, "status"
invoke-virtual {v1, v6, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v6
const/4 v7, -0x1
const/4 v8, 0x2
const/4 v9, 0x1
if-eq v6, v9, :cond_3
if-eq v6, v8, :cond_2
const/4 v10, 0x3
if-eq v6, v10, :cond_1
const/4 v10, 0x4
if-eq v6, v10, :cond_1
const/4 v10, 0x5
if-eq v6, v10, :cond_0
goto :goto_0
:cond_0
move v7, v8
goto :goto_0
:cond_1
move v7, v3
goto :goto_0
:cond_2
move v7, v9
:cond_3
:goto_0
const-string v6, "plugged"
invoke-virtual {v1, v6, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v1
if-eq v1, v9, :cond_5
if-eq v1, v8, :cond_4
goto :goto_1
:cond_4
move v3, v8
goto :goto_1
:cond_5
move v3, v9
:goto_1
new-instance v1, Lcom/uyumao/i;
invoke-direct {v1}, Lcom/uyumao/i;-><init>()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iput v2, v1, Lcom/uyumao/i;->a:I
iput v4, v1, Lcom/uyumao/i;->b:I
iput v7, v1, Lcom/uyumao/i;->d:I
iput v5, v1, Lcom/uyumao/i;->c:I
iput v3, v1, Lcom/uyumao/i;->e:I
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
iput-wide v2, v1, Lcom/uyumao/i;->f:J
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-object v0, v1
:catchall_1
monitor-exit p0
return-object v0
.end method