Spy.smali
3.9 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
.class public Lcom/umeng/umzid/Spy;
.super Ljava/lang/Object;
# static fields
.field public static initSuccess:Z = false
# direct methods
.method public static constructor <clinit>()V
.locals 1
:try_start_0
const-string v0, "umeng-spy"
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
const/4 v0, 0x1
sput-boolean v0, Lcom/umeng/umzid/Spy;->initSuccess:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v0
invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
:goto_0
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getID()Ljava/lang/String;
.locals 1
sget-boolean v0, Lcom/umeng/umzid/Spy;->initSuccess:Z
if-eqz v0, :cond_0
invoke-static {}, Lcom/umeng/umzid/Spy;->getNativeID()Ljava/lang/String;
move-result-object v0
return-object v0
:cond_0
const/4 v0, 0x0
return-object v0
.end method
.method public static native getNativeID()Ljava/lang/String;
.end method
.method public static native getNativeLibraryVersion()Ljava/lang/String;
.end method
.method public static native getNativeTag(ZZ)Ljava/lang/String;
.end method
.method public static declared-synchronized getTag(Landroid/content/Context;)Ljava/lang/String;
.locals 5
const-class v0, Lcom/umeng/umzid/Spy;
monitor-enter v0
const/4 v1, 0x1
const/4 v2, 0x0
if-eqz p0, :cond_3
:try_start_0
sget v3, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v4, 0xe
if-lt v3, v4, :cond_0
move v3, v1
goto :goto_0
:cond_0
move v3, v2
:goto_0
if-eqz v3, :cond_2
const-string v3, "http.proxyHost"
invoke-static {v3}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string v4, "http.proxyPort"
invoke-static {v4}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v4
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v4, :cond_1
goto :goto_1
:cond_1
:try_start_1
const-string v4, "-1"
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:goto_1
:try_start_2
invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v4
goto :goto_2
:cond_2
invoke-static {p0}, Landroid/net/Proxy;->getHost(Landroid/content/Context;)Ljava/lang/String;
move-result-object v3
invoke-static {p0}, Landroid/net/Proxy;->getPort(Landroid/content/Context;)I
move-result v4
:goto_2
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
if-nez v3, :cond_3
const/4 v3, -0x1
if-eq v4, v3, :cond_3
goto :goto_3
:catchall_0
move-exception v1
:try_start_3
invoke-virtual {v1}, Ljava/lang/Throwable;->printStackTrace()V
:cond_3
move v1, v2
:goto_3
if-eqz p0, :cond_4
invoke-static {p0}, Lcom/umeng/umzid/d;->d(Landroid/content/Context;)Z
move-result v2
:cond_4
invoke-static {v1, v2}, Lcom/umeng/umzid/Spy;->getNativeTag(ZZ)Ljava/lang/String;
move-result-object p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
monitor-exit v0
return-object p0
:catchall_1
move-exception p0
monitor-exit v0
throw p0
.end method
.method public static getVersion()Ljava/lang/String;
.locals 1
sget-boolean v0, Lcom/umeng/umzid/Spy;->initSuccess:Z
if-eqz v0, :cond_0
invoke-static {}, Lcom/umeng/umzid/Spy;->getNativeLibraryVersion()Ljava/lang/String;
move-result-object v0
return-object v0
:cond_0
const/4 v0, 0x0
return-object v0
.end method