Offset 1, 15 lines modifiedOffset 1, 13 lines modified
1 .class·public·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;1 .class·public·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;
2 .super·Ljava/lang/Object;2 .super·Ljava/lang/Object;
3 .source·"PrivateAddressCoordinator.java"3 .source·"PrivateAddressCoordinator.java"
  
  
4 #·instance·fields4 #·instance·fields
5 .field·private·final·mConfig:Lcom/android/networkstack/tethering/TetheringConfiguration; 
  
6 .field·private·final·mConnectivityMgr:Landroid/net/ConnectivityManager;5 .field·private·final·mConnectivityMgr:Landroid/net/ConnectivityManager;
  
7 .field·private·final·mDownstreams:Landroid/util/ArraySet;6 .field·private·final·mDownstreams:Landroid/util/ArraySet;
8 ····.annotation·system·Ldalvik/annotation/Signature;7 ····.annotation·system·Ldalvik/annotation/Signature;
9 ········value·=·{8 ········value·=·{
10 ············"Landroid/util/ArraySet<",9 ············"Landroid/util/ArraySet<",
11 ············"Landroid/net/ip/IpServer;",10 ············"Landroid/net/ip/IpServer;",
Offset 30, 75 lines modifiedOffset 28, 72 lines modified
30 ············">;>;"28 ············">;>;"
31 ········}29 ········}
32 ····.end·annotation30 ····.end·annotation
33 .end·field31 .end·field
  
  
34 #·direct·methods32 #·direct·methods
35 .method·public·constructor·<init>(Landroid/content/Context;Lcom/android/networkstack/tethering/TetheringConfiguration;)V33 .method·public·constructor·<init>(Landroid/content/Context;)V
36 ····.locals·234 ····.locals·2
  
37 ····.line·8235 ····.line·74
38 ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V36 ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V
  
39 ····.line·8337 ····.line·75
40 ····new-instance·v0,·Landroid/util/ArraySet;38 ····new-instance·v0,·Landroid/util/ArraySet;
  
41 ····invoke-direct·{v0},·Landroid/util/ArraySet;-><init>()V39 ····invoke-direct·{v0},·Landroid/util/ArraySet;-><init>()V
  
42 ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;40 ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;
  
43 ····.line·8441 ····.line·76
44 ····new-instance·v0,·Landroid/util/ArrayMap;42 ····new-instance·v0,·Landroid/util/ArrayMap;
  
45 ····invoke-direct·{v0},·Landroid/util/ArrayMap;-><init>()V43 ····invoke-direct·{v0},·Landroid/util/ArrayMap;-><init>()V
  
46 ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;44 ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
47 ····.line·8545 ····.line·77
48 ····new-instance·v0,·Landroid/net/IpPrefix;46 ····new-instance·v0,·Landroid/net/IpPrefix;
  
49 ····const-string·v1,·"192.168.0.0/16"47 ····const-string·v1,·"192.168.0.0/16"
  
50 ····invoke-direct·{v0,·v1},·Landroid/net/IpPrefix;-><init>(Ljava/lang/String;)V48 ····invoke-direct·{v0,·v1},·Landroid/net/IpPrefix;-><init>(Ljava/lang/String;)V
  
51 ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mTetheringPrefix:Landroid/net/IpPrefix;49 ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mTetheringPrefix:Landroid/net/IpPrefix;
  
52 ····const-string·v0,·"connectivity"50 ····const-string·v0,·"connectivity"
  
53 ····.line·8651 ····.line·78
54 ····invoke-virtual·{p1,·v0},·Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;52 ····invoke-virtual·{p1,·v0},·Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
  
55 ····move-result-object·p153 ····move-result-object·p1
  
56 ····check-cast·p1,·Landroid/net/ConnectivityManager;54 ····check-cast·p1,·Landroid/net/ConnectivityManager;
  
57 ····iput-object·p1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConnectivityMgr:Landroid/net/ConnectivityManager;55 ····iput-object·p1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConnectivityMgr:Landroid/net/ConnectivityManager;
  
58 ····.line·88 
59 ····iput-object·p2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConfig:Lcom/android/networkstack/tethering/TetheringConfiguration; 
  
60 ····return-void56 ····return-void
61 .end·method57 .end·method
  
62 .method·private·getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix;58 .method·private·getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix;
63 ····.locals·059 ····.locals·0
  
64 ····.line·25060 ····.line·233
65 ····invoke-virtual·{p1},·Landroid/net/ip/IpServer;->getAddress()Landroid/net/LinkAddress;61 ····invoke-virtual·{p1},·Landroid/net/ip/IpServer;->getAddress()Landroid/net/LinkAddress;
  
66 ····move-result-object·p062 ····move-result-object·p0
  
67 ····if-nez·p0,·:cond_063 ····if-nez·p0,·:cond_0
  
68 ····const/4·p0,·0x064 ····const/4·p0,·0x0
  
69 ····return-object·p065 ····return-object·p0
  
70 ····.line·25366 ····.line·236
71 ····:cond_067 ····:cond_0
72 ····invoke-static·{p0},·Landroid/net/util/PrefixUtils;->asIpPrefix(Landroid/net/LinkAddress;)Landroid/net/IpPrefix;68 ····invoke-static·{p0},·Landroid/net/util/PrefixUtils;->asIpPrefix(Landroid/net/LinkAddress;)Landroid/net/IpPrefix;
  
73 ····move-result-object·p069 ····move-result-object·p0
  
74 ····return-object·p070 ····return-object·p0
75 .end·method71 .end·method
Offset 113, 20 lines modifiedOffset 108, 20 lines modified
113 ············">;)",108 ············">;)",
114 ············"Ljava/util/ArrayList<",109 ············"Ljava/util/ArrayList<",
115 ············"Landroid/net/IpPrefix;",110 ············"Landroid/net/IpPrefix;",
116 ············">;"111 ············">;"
117 ········}112 ········}
118 ····.end·annotation113 ····.end·annotation
  
119 ····.line·107114 ····.line·98
120 ····new-instance·p0,·Ljava/util/ArrayList;115 ····new-instance·p0,·Ljava/util/ArrayList;
  
121 ····invoke-direct·{p0},·Ljava/util/ArrayList;-><init>()V116 ····invoke-direct·{p0},·Ljava/util/ArrayList;-><init>()V
  
122 ····.line·108117 ····.line·99
123 ····invoke-interface·{p1},·Ljava/util/List;->iterator()Ljava/util/Iterator;118 ····invoke-interface·{p1},·Ljava/util/List;->iterator()Ljava/util/Iterator;
  
124 ····move-result-object·p1119 ····move-result-object·p1
  
125 ····:goto_0120 ····:goto_0
126 ····invoke-interface·{p1},·Ljava/util/Iterator;->hasNext()Z121 ····invoke-interface·{p1},·Ljava/util/Iterator;->hasNext()Z
  
Offset 136, 24 lines modifiedOffset 131, 24 lines modified
  
136 ····invoke-interface·{p1},·Ljava/util/Iterator;->next()Ljava/lang/Object;131 ····invoke-interface·{p1},·Ljava/util/Iterator;->next()Ljava/lang/Object;
  
137 ····move-result-object·v0132 ····move-result-object·v0
  
138 ····check-cast·v0,·Landroid/net/LinkAddress;133 ····check-cast·v0,·Landroid/net/LinkAddress;
  
139 ····.line·109134 ····.line·100
140 ····invoke-virtual·{v0},·Landroid/net/LinkAddress;->isIpv4()Z135 ····invoke-virtual·{v0},·Landroid/net/LinkAddress;->isIpv4()Z
  
141 ····move-result·v1136 ····move-result·v1
  
142 ····if-nez·v1,·:cond_0137 ····if-nez·v1,·:cond_0
  
143 ····goto·:goto_0138 ····goto·:goto_0
  
144 ····.line·111139 ····.line·102
145 ····:cond_0140 ····:cond_0
146 ····invoke-static·{v0},·Landroid/net/util/PrefixUtils;->asIpPrefix(Landroid/net/LinkAddress;)Landroid/net/IpPrefix;141 ····invoke-static·{v0},·Landroid/net/util/PrefixUtils;->asIpPrefix(Landroid/net/LinkAddress;)Landroid/net/IpPrefix;
  
147 ····move-result-object·v0142 ····move-result-object·v0
  
148 ····invoke-virtual·{p0,·v0},·Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z143 ····invoke-virtual·{p0,·v0},·Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
  
Offset 166, 15 lines modifiedOffset 161, 15 lines modified
166 .method·private·varargs·getSanitizedAddressSuffix(I[B)B161 .method·private·varargs·getSanitizedAddressSuffix(I[B)B
167 ····.locals·2162 ····.locals·2
  
168 ····and-int/lit16·p0,·p1,·0xff163 ····and-int/lit16·p0,·p1,·0xff
  
169 ····int-to-byte·p0,·p0164 ····int-to-byte·p0,·p0
  
170 ····.line·204165 ····.line·187
171 ····array-length·p1,·p2166 ····array-length·p1,·p2
  
172 ····const/4·v0,·0x0167 ····const/4·v0,·0x0
  
173 ····:goto_0168 ····:goto_0
174 ····if-ge·v0,·p1,·:cond_1169 ····if-ge·v0,·p1,·:cond_1
  
Offset 202, 15 lines modifiedOffset 197, 15 lines modified
202 ············"(",197 ············"(",
203 ············"Ljava/util/List<",198 ············"Ljava/util/List<",
204 ············"Landroid/net/IpPrefix;",199 ············"Landroid/net/IpPrefix;",
205 ············">;)V"200 ············">;)V"
206 ········}201 ········}
207 ····.end·annotation202 ····.end·annotation
  
208 ····.line·118203 ····.line·109
209 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;204 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;
  
210 ····invoke-virtual·{v0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator;205 ····invoke-virtual·{v0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator;
  
211 ····move-result-object·v0206 ····move-result-object·v0
  
212 ····:cond_0207 ····:cond_0
Offset 223, 24 lines modifiedOffset 218, 24 lines modified
  
223 ····invoke-interface·{v0},·Ljava/util/Iterator;->next()Ljava/lang/Object;218 ····invoke-interface·{v0},·Ljava/util/Iterator;->next()Ljava/lang/Object;
  
224 ····move-result-object·v1219 ····move-result-object·v1
  
225 ····check-cast·v1,·Landroid/net/ip/IpServer;220 ····check-cast·v1,·Landroid/net/ip/IpServer;
  
226 ····.line·119221 ····.line·110
227 ····invoke-direct·{p0,·v1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix;222 ····invoke-direct·{p0,·v1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix;
  
228 ····move-result-object·v2223 ····move-result-object·v2
  
229 ····if-nez·v2,·:cond_1224 ····if-nez·v2,·:cond_1
  
230 ····goto·:goto_0225 ····goto·:goto_0
  
231 ····.line·122226 ····.line·113
232 ····:cond_1227 ····:cond_1
233 ····invoke-interface·{p1},·Ljava/util/List;->iterator()Ljava/util/Iterator;228 ····invoke-interface·{p1},·Ljava/util/List;->iterator()Ljava/util/Iterator;
  
234 ····move-result-object·v3229 ····move-result-object·v3
  
235 ····:cond_2230 ····:cond_2
236 ····invoke-interface·{v3},·Ljava/util/Iterator;->hasNext()Z231 ····invoke-interface·{v3},·Ljava/util/Iterator;->hasNext()Z
Offset 251, 58 lines modifiedOffset 246, 58 lines modified
  
251 ····invoke-interface·{v3},·Ljava/util/Iterator;->next()Ljava/lang/Object;246 ····invoke-interface·{v3},·Ljava/util/Iterator;->next()Ljava/lang/Object;
  
252 ····move-result-object·v4247 ····move-result-object·v4
  
253 ····check-cast·v4,·Landroid/net/IpPrefix;248 ····check-cast·v4,·Landroid/net/IpPrefix;
  
254 ····.line·123249 ····.line·114
255 ····invoke-direct·{p0,·v4,·v2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z250 ····invoke-direct·{p0,·v4,·v2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z
  
256 ····move-result·v4251 ····move-result·v4
  
257 ····if-eqz·v4,·:cond_2252 ····if-eqz·v4,·:cond_2
  
258 ····const/16·v2,·0x71253 ····const/16·v2,·0x71
  
259 ····.line·124254 ····.line·115
260 ····invoke-virtual·{v1,·v2},·Lcom/android/networkstack/tethering/util/StateMachine;->sendMessage(I)V255 ····invoke-virtual·{v1,·v2},·Lcom/android/networkstack/tethering/util/StateMachine;->sendMessage(I)V
  
261 ····goto·:goto_0256 ····goto·:goto_0
  
262 ····:cond_3257 ····:cond_3
263 ····return-void258 ····return-void
264 .end·method259 .end·method
  
265 .method·private·isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z260 .method·private·isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z
266 ····.locals·1261 ····.locals·1
  
267 ····.line·232262 ····.line·215
268 ····invoke-virtual·{p2},·Landroid/net/IpPrefix;->getPrefixLength()I263 ····invoke-virtual·{p2},·Landroid/net/IpPrefix;->getPrefixLength()I
  
269 ····move-result·p0264 ····move-result·p0
  
270 ····invoke-virtual·{p1},·Landroid/net/IpPrefix;->getPrefixLength()I265 ····invoke-virtual·{p1},·Landroid/net/IpPrefix;->getPrefixLength()I
  
271 ····move-result·v0266 ····move-result·v0
  
272 ····if-ge·p0,·v0,·:cond_0267 ····if-ge·p0,·v0,·:cond_0
  
273 ····.line·233268 ····.line·216
274 ····invoke-virtual·{p1},·Landroid/net/IpPrefix;->getAddress()Ljava/net/InetAddress;269 ····invoke-virtual·{p1},·Landroid/net/IpPrefix;->getAddress()Ljava/net/InetAddress;
  
275 ····move-result-object·p0270 ····move-result-object·p0
  
276 ····invoke-virtual·{p2,·p0},·Landroid/net/IpPrefix;->contains(Ljava/net/InetAddress;)Z271 ····invoke-virtual·{p2,·p0},·Landroid/net/IpPrefix;->contains(Ljava/net/InetAddress;)Z
  
277 ····move-result·p0272 ····move-result·p0
  
278 ····return·p0273 ····return·p0
  
279 ····.line·236274 ····.line·219
280 ····:cond_0275 ····:cond_0
281 ····invoke-virtual·{p2},·Landroid/net/IpPrefix;->getAddress()Ljava/net/InetAddress;276 ····invoke-virtual·{p2},·Landroid/net/IpPrefix;->getAddress()Ljava/net/InetAddress;
  
282 ····move-result-object·p0277 ····move-result-object·p0
  
283 ····invoke-virtual·{p1,·p0},·Landroid/net/IpPrefix;->contains(Ljava/net/InetAddress;)Z278 ····invoke-virtual·{p1,·p0},·Landroid/net/IpPrefix;->contains(Ljava/net/InetAddress;)Z
  
Offset 314, 34 lines modifiedOffset 309, 34 lines modified
314 .method·private·isConflictWithUpstream(Landroid/net/IpPrefix;)Z309 .method·private·isConflictWithUpstream(Landroid/net/IpPrefix;)Z
315 ····.locals·4310 ····.locals·4
  
316 ····const/4·v0,·0x0311 ····const/4·v0,·0x0
  
317 ····move·v1,·v0312 ····move·v1,·v0
  
318 ····.line·222313 ····.line·205
319 ····:goto_0314 ····:goto_0
320 ····iget-object·v2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;315 ····iget-object·v2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
321 ····invoke-virtual·{v2},·Landroid/util/ArrayMap;->size()I316 ····invoke-virtual·{v2},·Landroid/util/ArrayMap;->size()I
  
322 ····move-result·v2317 ····move-result·v2
  
323 ····if-ge·v1,·v2,·:cond_2318 ····if-ge·v1,·v2,·:cond_2
  
324 ····.line·223319 ····.line·206
325 ····iget-object·v2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;320 ····iget-object·v2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
326 ····invoke-virtual·{v2,·v1},·Landroid/util/ArrayMap;->valueAt(I)Ljava/lang/Object;321 ····invoke-virtual·{v2,·v1},·Landroid/util/ArrayMap;->valueAt(I)Ljava/lang/Object;
  
327 ····move-result-object·v2322 ····move-result-object·v2
  
328 ····check-cast·v2,·Ljava/util/List;323 ····check-cast·v2,·Ljava/util/List;
  
329 ····.line·224324 ····.line·207
330 ····invoke-interface·{v2},·Ljava/util/List;->iterator()Ljava/util/Iterator;325 ····invoke-interface·{v2},·Ljava/util/List;->iterator()Ljava/util/Iterator;
  
331 ····move-result-object·v2326 ····move-result-object·v2
  
332 ····:cond_0327 ····:cond_0
333 ····invoke-interface·{v2},·Ljava/util/Iterator;->hasNext()Z328 ····invoke-interface·{v2},·Ljava/util/Iterator;->hasNext()Z
  
Offset 351, 15 lines modifiedOffset 346, 15 lines modified
  
351 ····invoke-interface·{v2},·Ljava/util/Iterator;->next()Ljava/lang/Object;346 ····invoke-interface·{v2},·Ljava/util/Iterator;->next()Ljava/lang/Object;
  
352 ····move-result-object·v3347 ····move-result-object·v3
  
353 ····check-cast·v3,·Landroid/net/IpPrefix;348 ····check-cast·v3,·Landroid/net/IpPrefix;
  
354 ····.line·225349 ····.line·208
355 ····invoke-direct·{p0,·p1,·v3},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z350 ····invoke-direct·{p0,·p1,·v3},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z
  
356 ····move-result·v3351 ····move-result·v3
  
357 ····if-eqz·v3,·:cond_0352 ····if-eqz·v3,·:cond_0
  
358 ····const/4·p0,·0x1353 ····const/4·p0,·0x1
Offset 374, 15 lines modifiedOffset 369, 15 lines modified
374 ····:cond_2369 ····:cond_2
375 ····return·v0370 ····return·v0
376 .end·method371 .end·method
  
377 .method·private·isDownstreamPrefixInUse(Landroid/net/IpPrefix;)Z372 .method·private·isDownstreamPrefixInUse(Landroid/net/IpPrefix;)Z
378 ····.locals·2373 ····.locals·2
  
379 ····.line·242374 ····.line·225
380 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;375 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;
  
381 ····invoke-virtual·{v0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator;376 ····invoke-virtual·{v0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator;
  
382 ····move-result-object·v0377 ····move-result-object·v0
  
383 ····:cond_0378 ····:cond_0
Offset 394, 20 lines modifiedOffset 389, 20 lines modified
  
394 ····invoke-interface·{v0},·Ljava/util/Iterator;->next()Ljava/lang/Object;389 ····invoke-interface·{v0},·Ljava/util/Iterator;->next()Ljava/lang/Object;
  
395 ····move-result-object·v1390 ····move-result-object·v1
  
396 ····check-cast·v1,·Landroid/net/ip/IpServer;391 ····check-cast·v1,·Landroid/net/ip/IpServer;
  
397 ····.line·243392 ····.line·226
398 ····invoke-direct·{p0,·v1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix;393 ····invoke-direct·{p0,·v1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix;
  
399 ····move-result-object·v1394 ····move-result-object·v1
  
400 ····.line·244395 ····.line·227
401 ····invoke-virtual·{p1,·v1},·Landroid/net/IpPrefix;->equals(Ljava/lang/Object;)Z396 ····invoke-virtual·{p1,·v1},·Landroid/net/IpPrefix;->equals(Ljava/lang/Object;)Z
  
402 ····move-result·v1397 ····move-result·v1
  
403 ····if-eqz·v1,·:cond_0398 ····if-eqz·v1,·:cond_0
  
404 ····const/4·p0,·0x1399 ····const/4·p0,·0x1
Offset 416, 68 lines modifiedOffset 411, 130 lines modified
  
416 ····:cond_1411 ····:cond_1
417 ····const/4·p0,·0x0412 ····const/4·p0,·0x0
  
418 ····return·p0413 ····return·p0
419 .end·method414 .end·method
  
420 .method·private·isReservedSubnet(I)Z415 .method·private·maybeRemoveDeprectedUpstreams()V
421 ····.locals·0416 ····.locals·5
  
 417 ····.line·128
 418 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;
  
422 ····const/16·p0,·0x2c419 ····invoke-virtual·{v0},·Landroid/util/ArraySet;->isEmpty()Z
  
423 ····if-eq·p1,·p0,·:cond_1420 ····move-result·v0
  
424 ····const/16·p0,·0x31421 ····if-eqz·v0,·:cond_3
  
425 ····if-ne·p1,·p0,·:cond_0422 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
426 ····goto·:goto_0423 ····invoke-virtual·{v0},·Landroid/util/ArrayMap;->isEmpty()Z
  
427 ····:cond_0424 ····move-result·v0
428 ····const/4·p0,·0x0 
 425 ····if-eqz·v0,·:cond_0
  
429 ····goto·:goto_1426 ····goto·:goto_1
  
430 ····:cond_1427 ····.line·130
 428 ····:cond_0
 429 ····new-instance·v0,·Ljava/util/ArrayList;
  
 430 ····invoke-direct·{v0},·Ljava/util/ArrayList;-><init>()V
  
 431 ····.line·131
 432 ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConnectivityMgr:Landroid/net/ConnectivityManager;
  
 433 ····invoke-virtual·{v1},·Landroid/net/ConnectivityManager;->getAllNetworks()[Landroid/net/Network;
  
 434 ····move-result-object·v1
  
 435 ····invoke-static·{v1},·Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
  
 436 ····move-result-object·v1
  
 437 ····const/4·v2,·0x0
  
 438 ····.line·132
431 ····:goto_0439 ····:goto_0
432 ····const/4·p0,·0x1440 ····iget-object·v3,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
 441 ····invoke-virtual·{v3},·Landroid/util/ArrayMap;->size()I
  
 442 ····move-result·v3
  
 443 ····if-ge·v2,·v3,·:cond_2
  
 444 ····.line·133
 445 ····iget-object·v3,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
 446 ····invoke-virtual·{v3,·v2},·Landroid/util/ArrayMap;->keyAt(I)Ljava/lang/Object;
  
 447 ····move-result-object·v3
  
 448 ····check-cast·v3,·Landroid/net/Network;
  
 449 ····.line·134
 450 ····invoke-interface·{v1,·v3},·Ljava/util/List;->contains(Ljava/lang/Object;)Z
  
 451 ····move-result·v4
  
 452 ····if-nez·v4,·:cond_1
  
 453 ····invoke-virtual·{v0,·v3},·Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
  
 454 ····:cond_1
 455 ····add-int/lit8·v2,·v2,·0x1
  
 456 ····goto·:goto_0
  
 457 ····.line·137
 458 ····:cond_2
 459 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
 460 ····invoke-virtual·{p0,·v0},·Landroid/util/ArrayMap;->removeAll(Ljava/util/Collection;)Z
  
 461 ····:cond_3
433 ····:goto_1462 ····:goto_1
434 ····return·p0463 ····return-void
435 .end·method464 .end·method
  
  
436 #·virtual·methods465 #·virtual·methods
437 .method·dump(Lcom/android/networkstack/tethering/util/IndentingPrintWriter;)V466 .method·dump(Lcom/android/networkstack/tethering/util/IndentingPrintWriter;)V
438 ····.locals·4467 ····.locals·4
  
 468 ····.line·240
 469 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;
  
439 ····const-string·v0,·"mUpstreamPrefixMap:"470 ····const-string·v0,·"mUpstreamPrefixMap:"
  
440 ····.line·257471 ····.line·241
441 ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V472 ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V
  
442 ····.line·258473 ····.line·242
443 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->increaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;474 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->increaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;
  
444 ····const/4·v0,·0x0475 ····const/4·v0,·0x0
  
445 ····.line·259476 ····.line·243
446 ····:goto_0477 ····:goto_0
447 ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;478 ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
448 ····invoke-virtual·{v1},·Landroid/util/ArrayMap;->size()I479 ····invoke-virtual·{v1},·Landroid/util/ArrayMap;->size()I
  
449 ····move-result·v1480 ····move-result·v1
  
450 ····const-string·v2,·"·-·"481 ····const-string·v2,·"·-·"
  
451 ····if-ge·v0,·v1,·:cond_0482 ····if-ge·v0,·v1,·:cond_0
  
452 ····.line·260483 ····.line·244
453 ····new-instance·v1,·Ljava/lang/StringBuilder;484 ····new-instance·v1,·Ljava/lang/StringBuilder;
  
454 ····invoke-direct·{v1},·Ljava/lang/StringBuilder;-><init>()V485 ····invoke-direct·{v1},·Ljava/lang/StringBuilder;-><init>()V
  
455 ····iget-object·v3,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;486 ····iget-object·v3,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
456 ····invoke-virtual·{v3,·v0},·Landroid/util/ArrayMap;->keyAt(I)Ljava/lang/Object;487 ····invoke-virtual·{v3,·v0},·Landroid/util/ArrayMap;->keyAt(I)Ljava/lang/Object;
Offset 502, 27 lines modifiedOffset 559, 27 lines modified
  
502 ····invoke-virtual·{p1,·v1},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V559 ····invoke-virtual·{p1,·v1},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V
  
503 ····add-int/lit8·v0,·v0,·0x1560 ····add-int/lit8·v0,·v0,·0x1
  
504 ····goto·:goto_0561 ····goto·:goto_0
  
505 ····.line·262562 ····.line·246
506 ····:cond_0563 ····:cond_0
507 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;564 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;
  
508 ····const-string·v0,·"mDownstreams:"565 ····const-string·v0,·"mDownstreams:"
  
509 ····.line·263566 ····.line·247
510 ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V567 ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V
  
511 ····.line·264568 ····.line·248
512 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->increaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;569 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->increaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;
  
513 ····.line·265570 ····.line·249
514 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;571 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;
  
515 ····invoke-virtual·{p0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator;572 ····invoke-virtual·{p0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator;
  
516 ····move-result-object·p0573 ····move-result-object·p0
  
517 ····:goto_1574 ····:goto_1
Offset 534, 15 lines modifiedOffset 591, 15 lines modified
  
534 ····invoke-interface·{p0},·Ljava/util/Iterator;->next()Ljava/lang/Object;591 ····invoke-interface·{p0},·Ljava/util/Iterator;->next()Ljava/lang/Object;
  
535 ····move-result-object·v0592 ····move-result-object·v0
  
536 ····check-cast·v0,·Landroid/net/ip/IpServer;593 ····check-cast·v0,·Landroid/net/ip/IpServer;
  
537 ····.line·266594 ····.line·250
538 ····new-instance·v1,·Ljava/lang/StringBuilder;595 ····new-instance·v1,·Ljava/lang/StringBuilder;
  
539 ····invoke-direct·{v1},·Ljava/lang/StringBuilder;-><init>()V596 ····invoke-direct·{v1},·Ljava/lang/StringBuilder;-><init>()V
  
540 ····invoke-virtual·{v0},·Landroid/net/ip/IpServer;->interfaceType()I597 ····invoke-virtual·{v0},·Landroid/net/ip/IpServer;->interfaceType()I
  
541 ····move-result·v3598 ····move-result·v3
Offset 561, 25 lines modifiedOffset 618, 25 lines modified
  
561 ····move-result-object·v0618 ····move-result-object·v0
  
562 ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V619 ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V
  
563 ····goto·:goto_1620 ····goto·:goto_1
  
564 ····.line·268621 ····.line·252
565 ····:cond_1622 ····:cond_1
566 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;623 ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter;
  
567 ····return-void624 ····return-void
568 .end·method625 .end·method
  
569 .method·public·getRandomSubAddr()I626 .method·public·getRandomSubAddr()I
570 ····.locals·1627 ····.locals·1
  
571 ····.line·199628 ····.line·182
572 ····new-instance·p0,·Ljava/util/Random;629 ····new-instance·p0,·Ljava/util/Random;
  
573 ····invoke-direct·{p0},·Ljava/util/Random;-><init>()V630 ····invoke-direct·{p0},·Ljava/util/Random;-><init>()V
  
574 ····invoke-virtual·{p0},·Ljava/util/Random;->nextInt()I631 ····invoke-virtual·{p0},·Ljava/util/Random;->nextInt()I
  
575 ····move-result·p0632 ····move-result·p0
Offset 587, 274 lines modifiedOffset 644, 199 lines modified
587 ····const·v0,·0xffff644 ····const·v0,·0xffff
  
588 ····and-int/2addr·p0,·v0645 ····and-int/2addr·p0,·v0
  
589 ····return·p0646 ····return·p0
590 .end·method647 .end·method
  
591 .method·public·maybeRemoveDeprecatedUpstreams()V 
592 ····.locals·2 
  
593 ····.line·141 
594 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; 
  
595 ····invoke-virtual·{v0},·Landroid/util/ArrayMap;->isEmpty()Z 
  
596 ····move-result·v0 
  
597 ····if-eqz·v0,·:cond_0 
  
598 ····return-void 
  
599 ····.line·144 
600 ····:cond_0 
601 ····new-instance·v0,·Ljava/util/HashSet; 
  
602 ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; 
  
603 ····invoke-virtual·{v1},·Landroid/util/ArrayMap;->keySet()Ljava/util/Set; 
  
604 ····move-result-object·v1 
  
605 ····invoke-direct·{v0,·v1},·Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V 
  
606 ····.line·145 
607 ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConnectivityMgr:Landroid/net/ConnectivityManager; 
  
608 ····invoke-virtual·{v1},·Landroid/net/ConnectivityManager;->getAllNetworks()[Landroid/net/Network; 
  
609 ····move-result-object·v1 
  
610 ····invoke-static·{v1},·Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List; 
  
611 ····move-result-object·v1 
  
612 ····invoke-interface·{v0,·v1},·Ljava/util/Set;->removeAll(Ljava/util/Collection;)Z 
  
613 ····.line·147 
614 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; 
  
615 ····invoke-virtual·{p0,·v0},·Landroid/util/ArrayMap;->removeAll(Ljava/util/Collection;)Z 
  
616 ····return-void 
617 .end·method 
  
618 .method·public·releaseDownstream(Landroid/net/ip/IpServer;)V648 .method·public·releaseDownstream(Landroid/net/ip/IpServer;)V
619 ····.locals·0649 ····.locals·0
  
620 ····.line·213650 ····.line·196
621 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;651 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;
  
622 ····invoke-virtual·{p0,·p1},·Landroid/util/ArraySet;->remove(Ljava/lang/Object;)Z652 ····invoke-virtual·{p0,·p1},·Landroid/util/ArraySet;->remove(Ljava/lang/Object;)Z
  
623 ····return-void653 ····return-void
624 .end·method654 .end·method
  
625 .method·public·removeUpstreamPrefix(Landroid/net/Network;)V655 .method·public·removeUpstreamPrefix(Landroid/net/Network;)V
626 ····.locals·0656 ····.locals·0
  
627 ····.line·133657 ····.line·124
628 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;658 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
629 ····invoke-virtual·{p0,·p1},·Landroid/util/ArrayMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;659 ····invoke-virtual·{p0,·p1},·Landroid/util/ArrayMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
  
630 ····return-void660 ····return-void
631 .end·method661 .end·method
  
632 .method·public·requestDownstreamAddress(Landroid/net/ip/IpServer;)Landroid/net/LinkAddress;662 .method·public·requestDownstreamAddress(Landroid/net/ip/IpServer;)Landroid/net/LinkAddress;
633 ····.locals·7663 ····.locals·7
  
634 ····.line·160664 ····.line·146
635 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConfig:Lcom/android/networkstack/tethering/TetheringConfiguration;665 ····invoke-direct·{p0},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->maybeRemoveDeprectedUpstreams()V
  
636 ····invoke-virtual·{v0},·Lcom/android/networkstack/tethering/TetheringConfiguration;->shouldEnableWifiP2pDedicatedIp()Z 
  
637 ····move-result·v0 
  
638 ····const/4·v1,·0x3 
  
639 ····if-eqz·v0,·:cond_0 
  
640 ····.line·161 
641 ····invoke-virtual·{p1},·Landroid/net/ip/IpServer;->interfaceType()I 
  
642 ····move-result·v0 
  
643 ····if-ne·v0,·v1,·:cond_0 
  
644 ····.line·162 
645 ····new-instance·p0,·Landroid/net/LinkAddress; 
  
646 ····const-string·p1,·"192.168.49.1/24" 
  
647 ····invoke-direct·{p0,·p1},·Landroid/net/LinkAddress;-><init>(Ljava/lang/String;)V666 ····.line·149
  
648 ····return-object·p0 
  
649 ····.line·166 
650 ····:cond_0 
651 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mTetheringPrefix:Landroid/net/IpPrefix;667 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mTetheringPrefix:Landroid/net/IpPrefix;
  
652 ····invoke-virtual·{v0},·Landroid/net/IpPrefix;->getRawAddress()[B668 ····invoke-virtual·{v0},·Landroid/net/IpPrefix;->getRawAddress()[B
  
653 ····move-result-object·v0669 ····move-result-object·v0
  
654 ····.line·167670 ····.line·150
655 ····invoke-virtual·{p0},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getRandomSubAddr()I671 ····invoke-virtual·{p0},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getRandomSubAddr()I
  
656 ····move-result·v2672 ····move-result·v1
  
657 ····shr-int/lit8·v3,·v2,·0x8673 ····shr-int/lit8·v2,·v1,·0x8
  
658 ····and-int/lit16·v3,·v3,·0xff674 ····and-int/lit16·v2,·v2,·0xff
  
659 ····new-array·v4,·v1,·[B675 ····const/4·v3,·0x3
  
660 ····.line·169676 ····new-array·v4,·v3,·[B
  
 677 ····.line·152
661 ····fill-array-data·v4,·:array_0678 ····fill-array-data·v4,·:array_0
  
662 ····invoke-direct·{p0,·v2,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getSanitizedAddressSuffix(I[B)B679 ····invoke-direct·{p0,·v1,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getSanitizedAddressSuffix(I[B)B
  
663 ····move-result·v2680 ····move-result·v1
  
664 ····aput-byte·v2,·v0,·v1681 ····aput-byte·v1,·v0,·v3
  
665 ····const/4·v1,·0x0682 ····const/4·v1,·0x0
  
666 ····:goto_0683 ····:goto_0
667 ····const/16·v2,·0x100684 ····const/16·v3,·0x100
  
668 ····if-ge·v1,·v2,·:cond_4685 ····if-ge·v1,·v3,·:cond_3
  
669 ····add-int·v2,·v3,·v1686 ····add-int·v3,·v2,·v1
  
670 ····and-int/lit16·v2,·v2,·0xff687 ····and-int/lit16·v3,·v3,·0xff
  
671 ····.line·172 
672 ····invoke-direct·{p0,·v2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isReservedSubnet(I)Z 
  
673 ····move-result·v4688 ····const/16·v4,·0x2c
  
674 ····if-eqz·v4,·:cond_1689 ····if-ne·v3,·v4,·:cond_0
  
675 ····goto·:goto_1690 ····goto·:goto_1
  
676 ····:cond_1691 ····:cond_0
677 ····const/4·v4,·0x2692 ····const/4·v4,·0x2
  
678 ····int-to-byte·v2,·v2693 ····int-to-byte·v3,·v3
  
679 ····.line·174694 ····.line·157
680 ····aput-byte·v2,·v0,·v4695 ····aput-byte·v3,·v0,·v4
  
681 ····.line·177696 ····.line·160
682 ····:try_start_0697 ····:try_start_0
683 ····invoke-static·{v0},·Ljava/net/InetAddress;->getByAddress([B)Ljava/net/InetAddress;698 ····invoke-static·{v0},·Ljava/net/InetAddress;->getByAddress([B)Ljava/net/InetAddress;
  
684 ····move-result-object·v2699 ····move-result-object·v3
685 ····:try_end_0700 ····:try_end_0
686 ····.catch·Ljava/net/UnknownHostException;·{:try_start_0·..·:try_end_0}·:catch_0701 ····.catch·Ljava/net/UnknownHostException;·{:try_start_0·..·:try_end_0}·:catch_0
  
687 ····.line·182702 ····.line·165
688 ····new-instance·v4,·Landroid/net/IpPrefix;703 ····new-instance·v4,·Landroid/net/IpPrefix;
  
689 ····const/16·v5,·0x18704 ····const/16·v5,·0x18
  
690 ····invoke-direct·{v4,·v2,·v5},·Landroid/net/IpPrefix;-><init>(Ljava/net/InetAddress;I)V705 ····invoke-direct·{v4,·v3,·v5},·Landroid/net/IpPrefix;-><init>(Ljava/net/InetAddress;I)V
  
691 ····.line·184706 ····.line·167
692 ····invoke-direct·{p0,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isDownstreamPrefixInUse(Landroid/net/IpPrefix;)Z707 ····invoke-direct·{p0,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isDownstreamPrefixInUse(Landroid/net/IpPrefix;)Z
  
693 ····move-result·v6708 ····move-result·v6
  
694 ····if-eqz·v6,·:cond_2709 ····if-eqz·v6,·:cond_1
  
695 ····goto·:goto_1710 ····goto·:goto_1
  
696 ····.line·186711 ····.line·169
697 ····:cond_2712 ····:cond_1
698 ····invoke-direct·{p0,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictWithUpstream(Landroid/net/IpPrefix;)Z713 ····invoke-direct·{p0,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictWithUpstream(Landroid/net/IpPrefix;)Z
  
699 ····move-result·v4714 ····move-result·v4
  
700 ····if-eqz·v4,·:cond_3715 ····if-eqz·v4,·:cond_2
  
701 ····:goto_1716 ····:goto_1
702 ····add-int/lit8·v1,·v1,·0x1717 ····add-int/lit8·v1,·v1,·0x1
  
703 ····goto·:goto_0718 ····goto·:goto_0
  
704 ····.line·188719 ····.line·171
705 ····:cond_3720 ····:cond_2
706 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;721 ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet;
  
707 ····invoke-virtual·{p0,·p1},·Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z722 ····invoke-virtual·{p0,·p1},·Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
  
708 ····.line·189723 ····.line·172
709 ····new-instance·p0,·Landroid/net/LinkAddress;724 ····new-instance·p0,·Landroid/net/LinkAddress;
  
710 ····invoke-direct·{p0,·v2,·v5},·Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V725 ····invoke-direct·{p0,·v3,·v5},·Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V
  
711 ····return-object·p0726 ····return-object·p0
  
712 ····:catch_0727 ····:catch_0
713 ····move-exception·p0728 ····move-exception·p0
  
714 ····.line·179729 ····.line·162
715 ····new-instance·p1,·Ljava/lang/IllegalStateException;730 ····new-instance·p1,·Ljava/lang/IllegalStateException;
  
716 ····const-string·v0,·"Invalid·address,·shouldn\'t·happen."731 ····const-string·v0,·"Invalid·address,·shouldn\'t·happen."
  
717 ····invoke-direct·{p1,·v0,·p0},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V732 ····invoke-direct·{p1,·v0,·p0},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
  
718 ····throw·p1733 ····throw·p1
  
719 ····:cond_4734 ····:cond_3
720 ····const/4·p0,·0x0735 ····const/4·p0,·0x0
  
721 ····return-object·p0736 ····return-object·p0
  
722 ····nop 
  
723 ····:array_0737 ····:array_0
724 ····.array-data·1738 ····.array-data·1
725 ········0x0t739 ········0x0t
726 ········0x1t740 ········0x1t
727 ········-0x1t741 ········-0x1t
728 ····.end·array-data742 ····.end·array-data
729 .end·method743 .end·method
  
730 .method·public·updateUpstreamPrefix(Landroid/net/Network;Landroid/net/LinkProperties;)V744 .method·public·updateUpstreamPrefix(Landroid/net/Network;Landroid/net/LinkProperties;)V
731 ····.locals·1745 ····.locals·1
  
732 ····.line·96746 ····.line·87
733 ····invoke-virtual·{p2},·Landroid/net/LinkProperties;->getAllLinkAddresses()Ljava/util/List;747 ····invoke-virtual·{p2},·Landroid/net/LinkProperties;->getAllLinkAddresses()Ljava/util/List;
  
734 ····move-result-object·p2748 ····move-result-object·p2
  
735 ····invoke-direct·{p0,·p2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getIpv4Prefixes(Ljava/util/List;)Ljava/util/ArrayList;749 ····invoke-direct·{p0,·p2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getIpv4Prefixes(Ljava/util/List;)Ljava/util/ArrayList;
  
736 ····move-result-object·p2750 ····move-result-object·p2
  
737 ····.line·97751 ····.line·88
738 ····invoke-virtual·{p2},·Ljava/util/ArrayList;->isEmpty()Z752 ····invoke-virtual·{p2},·Ljava/util/ArrayList;->isEmpty()Z
  
739 ····move-result·v0753 ····move-result·v0
  
740 ····if-eqz·v0,·:cond_0754 ····if-eqz·v0,·:cond_0
  
741 ····.line·98755 ····.line·89
742 ····invoke-virtual·{p0,·p1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->removeUpstreamPrefix(Landroid/net/Network;)V756 ····invoke-virtual·{p0,·p1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->removeUpstreamPrefix(Landroid/net/Network;)V
  
743 ····return-void757 ····return-void
  
744 ····.line·102758 ····.line·93
745 ····:cond_0759 ····:cond_0
746 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;760 ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap;
  
747 ····invoke-virtual·{v0,·p1,·p2},·Landroid/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;761 ····invoke-virtual·{v0,·p1,·p2},·Landroid/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
  
748 ····.line·103762 ····.line·94
749 ····invoke-direct·{p0,·p2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->handleMaybePrefixConflict(Ljava/util/List;)V763 ····invoke-direct·{p0,·p2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->handleMaybePrefixConflict(Ljava/util/List;)V
  
750 ····return-void764 ····return-void
751 .end·method765 .end·method