-
Notifications
You must be signed in to change notification settings - Fork 1
/
Internet.smali
166 lines (96 loc) · 3.44 KB
/
Internet.smali
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 Lmt/Internet;
.super Landroid/content/ContentProvider;
# direct methods
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Landroid/content/ContentProvider;-><init>()V
return-void
.end method
.method private isNetworkConnected(Landroid/content/Context;)Z
.registers 5
const-string v2, "connectivity"
invoke-virtual {p1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/ConnectivityManager;
invoke-virtual {v0}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
move-result-object v1
if-eqz v1, :cond_16
invoke-virtual {v1}, Landroid/net/NetworkInfo;->isConnectedOrConnecting()Z
move-result v2
if-eqz v2, :cond_16
const/4 v2, 0x1
:goto_15
return v2
:cond_16
const/4 v2, 0x0
goto :goto_15
.end method
.method private isNetworkStatus(Landroid/content/Context;)Z
.registers 5
if-eqz p1, :cond_15
const-string v2, "connectivity"
invoke-virtual {p1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/ConnectivityManager;
invoke-virtual {v0}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
move-result-object v1
if-eqz v1, :cond_15
invoke-virtual {v1}, Landroid/net/NetworkInfo;->isAvailable()Z
move-result v2
:goto_14
return v2
:cond_15
const/4 v2, 0x0
goto :goto_14
.end method
# virtual methods
.method public delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
.registers 5
const/4 v0, 0x0
return v0
.end method
.method public getType(Landroid/net/Uri;)Ljava/lang/String;
.registers 3
const/4 v0, 0x0
return-object v0
.end method
.method public insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
.registers 4
const/4 v0, 0x0
return-object v0
.end method
.method public onCreate()Z
.registers 3
const/4 v1, 0x0
invoke-virtual {p0}, Lmt/Internet;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/Context;
invoke-direct {p0, v0}, Lmt/Internet;->isNetworkStatus(Landroid/content/Context;)Z
move-result v0
if-nez v0, :cond_14
invoke-static {v1}, Ljava/lang/System;->exit(I)V
:cond_14
invoke-virtual {p0}, Lmt/Internet;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/Context;
invoke-direct {p0, v0}, Lmt/Internet;->isNetworkConnected(Landroid/content/Context;)Z
move-result v0
if-nez v0, :cond_27
invoke-static {v1}, Ljava/lang/System;->exit(I)V
:cond_27
return v1
.end method
.method public query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
.registers 7
const/4 v0, 0x0
return-object v0
.end method
.method public update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
.registers 6
const/4 v0, 0x0
return v0
.end method