| | | |
Offset 1, 37 lines modified | Offset 1, 32 lines modified |
| |
1 | package·com.android.server.wifi; | 1 | package·com.android.server.wifi; |
| |
2 | import·android.net.wifi.SupplicantState; | |
3 | import·android.net.wifi.WifiSsid; | |
4 | import·android.net.wifi.WifiConfiguration; | 2 | import·android.net.wifi.WifiConfiguration; |
5 | import·java.util.ArrayList; | |
6 | import·com.android.server.wifi.util.NativeUtil; | |
7 | import·android.util.Log; | 3 | import·android.util.Log; |
| 4 | import·java.util.ArrayList; |
8 | import·com.android.wifi.x.android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback$BssTmData; | 5 | import·com.android.wifi.x.android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback$BssTmData; |
9 | import·com.android.wifi.x.android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback$Hs20AnqpData; | 6 | import·com.android.wifi.x.android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback$Hs20AnqpData; |
10 | import·com.android.wifi.x.android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback$AnqpData; | 7 | import·com.android.wifi.x.android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback$AnqpData; |
11 | import·java.util.Objects; | 8 | import·java.util.Objects; |
12 | import·com.android.wifi.x.android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback$Stub; | 9 | import·com.android.wifi.x.android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback$Stub; |
| |
13 | abstract·class·SupplicantStaIfaceCallbackV1_3Impl·extends·ISupplicantStaIfaceCallback$Stub | 10 | abstract·class·SupplicantStaIfaceCallbackV1_3Impl·extends·ISupplicantStaIfaceCallback$Stub |
14 | { | 11 | { |
15 | ····private·static·final·String·TAG; | 12 | ····private·static·final·String·TAG; |
16 | ····private·final·SupplicantStaIfaceHal$SupplicantStaIfaceHalCallbackV1_2·mCallbackV12; | 13 | ····private·final·SupplicantStaIfaceHal$SupplicantStaIfaceHalCallbackV1_2·mCallbackV12; |
17 | ····private·final·String·mIfaceName; | 14 | ····private·final·String·mIfaceName; |
18 | ····private·final·SupplicantStaIfaceHal·mStaIfaceHal; | 15 | ····private·final·SupplicantStaIfaceHal·mStaIfaceHal; |
19 | ····private·boolean·mStateIsFourwayV13; | |
20 | ····private·final·WifiMonitor·mWifiMonitor; | 16 | ····private·final·WifiMonitor·mWifiMonitor; |
21 | ···· | 17 | ···· |
22 | ····static·{ | 18 | ····static·{ |
23 | ········TAG·=·SupplicantStaIfaceCallbackV1_3Impl.class.getSimpleName(); | 19 | ········TAG·=·SupplicantStaIfaceCallbackV1_3Impl.class.getSimpleName(); |
24 | ····} | 20 | ····} |
25 | ···· | 21 | ···· |
26 | ····SupplicantStaIfaceCallbackV1_3Impl(final·SupplicantStaIfaceHal·mStaIfaceHal,·final·String·mIfaceName,·final·WifiMonitor·mWifiMonitor)·{ | 22 | ····SupplicantStaIfaceCallbackV1_3Impl(final·SupplicantStaIfaceHal·mStaIfaceHal,·final·String·mIfaceName,·final·WifiMonitor·mWifiMonitor)·{ |
27 | ········this.mStateIsFourwayV13·=·false; | |
28 | ········this.mStaIfaceHal·=·mStaIfaceHal; | 23 | ········this.mStaIfaceHal·=·mStaIfaceHal; |
29 | ········this.mIfaceName·=·mIfaceName; | 24 | ········this.mIfaceName·=·mIfaceName; |
30 | ········this.mWifiMonitor·=·mWifiMonitor; | 25 | ········this.mWifiMonitor·=·mWifiMonitor; |
31 | ········final·SupplicantStaIfaceHal·mStaIfaceHal2·=·this.mStaIfaceHal; | 26 | ········final·SupplicantStaIfaceHal·mStaIfaceHal2·=·this.mStaIfaceHal; |
32 | ········Objects.requireNonNull(mStaIfaceHal2); | 27 | ········Objects.requireNonNull(mStaIfaceHal2); |
33 | ········this.mCallbackV12·=·new·SupplicantStaIfaceHal$SupplicantStaIfaceHalCallbackV1_2(mStaIfaceHal2,·this.mIfaceName); | 28 | ········this.mCallbackV12·=·new·SupplicantStaIfaceHal$SupplicantStaIfaceHalCallbackV1_2(mStaIfaceHal2,·this.mIfaceName); |
34 | ····} | 29 | ····} |
Offset 165, 15 lines modified | Offset 160, 15 lines modified |
165 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onAuthenticationTimeout(array); | 160 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onAuthenticationTimeout(array); |
166 | ····} | 161 | ····} |
167 | ···· | 162 | ···· |
168 | ····public·void·onBssTmHandlingDone(final·ISupplicantStaIfaceCallback$BssTmData·supplicantStaIfaceCallback$BssTmData)·{ | 163 | ····public·void·onBssTmHandlingDone(final·ISupplicantStaIfaceCallback$BssTmData·supplicantStaIfaceCallback$BssTmData)·{ |
169 | ········final·MboOceController$BtmFrameData·mboOceController$BtmFrameData·=·new·MboOceController$BtmFrameData(); | 164 | ········final·MboOceController$BtmFrameData·mboOceController$BtmFrameData·=·new·MboOceController$BtmFrameData(); |
170 | ········mboOceController$BtmFrameData.mStatus·=·this.halToFrameworkBtmResponseStatus(supplicantStaIfaceCallback$BssTmData.status); | 165 | ········mboOceController$BtmFrameData.mStatus·=·this.halToFrameworkBtmResponseStatus(supplicantStaIfaceCallback$BssTmData.status); |
171 | ········mboOceController$BtmFrameData.mBssTmDataFlagsMask·=·this.halToFrameworkBssTmDataFlagsMask(supplicantStaIfaceCallback$BssTmData.flags); | 166 | ········mboOceController$BtmFrameData.mBssTmDataFlagsMask·=·this.halToFrameworkBssTmDataFlagsMask(supplicantStaIfaceCallback$BssTmData.flags); |
172 | ········mboOceController$BtmFrameData.mBlackListDurationMs·=·supplicantStaIfaceCallback$BssTmData.assocRetryDelayMs; | 167 | ········mboOceController$BtmFrameData.mBlockListDurationMs·=·supplicantStaIfaceCallback$BssTmData.assocRetryDelayMs; |
173 | ········if·((supplicantStaIfaceCallback$BssTmData.flags·&·0x20)·!=·0x0)·{ | 168 | ········if·((supplicantStaIfaceCallback$BssTmData.flags·&·0x20)·!=·0x0)·{ |
174 | ············mboOceController$BtmFrameData.mTransitionReason·=·this.halToFrameworkMboTransitionReason(supplicantStaIfaceCallback$BssTmData.mboTransitionReason); | 169 | ············mboOceController$BtmFrameData.mTransitionReason·=·this.halToFrameworkMboTransitionReason(supplicantStaIfaceCallback$BssTmData.mboTransitionReason); |
175 | ········} | 170 | ········} |
176 | ········if·((supplicantStaIfaceCallback$BssTmData.flags·&·0x80)·!=·0x0)·{ | 171 | ········if·((supplicantStaIfaceCallback$BssTmData.flags·&·0x80)·!=·0x0)·{ |
177 | ············mboOceController$BtmFrameData.mCellPreference·=·this.halToFrameworkMboCellularDataConnectionPreference(supplicantStaIfaceCallback$BssTmData.mboCellPreference); | 172 | ············mboOceController$BtmFrameData.mCellPreference·=·this.halToFrameworkMboCellularDataConnectionPreference(supplicantStaIfaceCallback$BssTmData.mboCellPreference); |
178 | ········} | 173 | ········} |
179 | ········this.mStaIfaceHal.logCallback("onBssTmHandlingDone:·Handle·BTM·handling·event"); | 174 | ········this.mStaIfaceHal.logCallback("onBssTmHandlingDone:·Handle·BTM·handling·event"); |
Offset 181, 30 lines modified | Offset 176, 15 lines modified |
181 | ····} | 176 | ····} |
182 | ···· | 177 | ···· |
183 | ····public·void·onBssidChanged(final·byte·b,·final·byte[]·array)·{ | 178 | ····public·void·onBssidChanged(final·byte·b,·final·byte[]·array)·{ |
184 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onBssidChanged(b,·array); | 179 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onBssidChanged(b,·array); |
185 | ····} | 180 | ····} |
186 | ···· | 181 | ···· |
187 | ····public·void·onDisconnected(final·byte[]·array,·final·boolean·b,·final·int·n)·{ | 182 | ····public·void·onDisconnected(final·byte[]·array,·final·boolean·b,·final·int·n)·{ |
188 | ········this.mStaIfaceHal.logCallback("onDisconnected"); | 183 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onDisconnected(array,·b,·n); |
189 | ········if·(this.mStaIfaceHal.isVerboseLoggingEnabled())·{ | |
190 | ············final·String·tag·=·SupplicantStaIfaceCallbackV1_3Impl.TAG; | |
191 | ············final·StringBuilder·sb·=·new·StringBuilder(); | |
192 | ············sb.append("onDisconnected·4way="); | |
193 | ············sb.append(this.mStateIsFourwayV13); | |
194 | ············sb.append("·locallyGenerated="); | |
195 | ············sb.append(b); | |
196 | ············sb.append("·reasonCode="); | |
197 | ············sb.append(n); | |
198 | ············Log.e(tag,·sb.toString()); | |
199 | ········} | |
200 | ········if·(this.mStateIsFourwayV13·&&·(!b·||·n·!=·17))·{ | |
201 | ············this.mWifiMonitor.broadcastAuthenticationFailureEvent(this.mIfaceName,·2,·-1); | |
202 | ········} | |
203 | ········this.mWifiMonitor.broadcastNetworkDisconnectionEvent(this.mIfaceName,·(int)(b·?·1·:·0),·n,·NativeUtil.macAddressFromByteArray(array)); | |
204 | ····} | 184 | ····} |
205 | ···· | 185 | ···· |
206 | ····public·void·onDppFailure(final·int·n)·{ | 186 | ····public·void·onDppFailure(final·int·n)·{ |
207 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onDppFailure(n); | 187 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onDppFailure(n); |
208 | ····} | 188 | ····} |
209 | ···· | 189 | ···· |
210 | ····public·void·onDppFailure_1_3(final·int·n,·final·String·s,·final·String·s2,·final·ArrayList·list)·{ | 190 | ····public·void·onDppFailure_1_3(final·int·n,·final·String·s,·final·String·s2,·final·ArrayList·list)·{ |
Offset 286, 16 lines modified | Offset 266, 15 lines modified |
286 | ····} | 266 | ····} |
287 | ···· | 267 | ···· |
288 | ····public·void·onNetworkAdded(final·int·n)·{ | 268 | ····public·void·onNetworkAdded(final·int·n)·{ |
289 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onNetworkAdded(n); | 269 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onNetworkAdded(n); |
290 | ····} | 270 | ····} |
291 | ···· | 271 | ···· |
292 | ····public·void·onNetworkRemoved(final·int·n)·{ | 272 | ····public·void·onNetworkRemoved(final·int·n)·{ |
293 | ········this.mStaIfaceHal.logCallback("onNetworkRemoved"); | 273 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onNetworkRemoved(n); |
294 | ········this.mStateIsFourwayV13·=·false; | |
295 | ····} | 274 | ····} |
296 | ···· | 275 | ···· |
297 | ····public·void·onPmkCacheAdded(final·long·n,·final·ArrayList·list)·{ | 276 | ····public·void·onPmkCacheAdded(final·long·n,·final·ArrayList·list)·{ |
298 | ········final·WifiConfiguration·currentNetworkLocalConfig·=·this.mStaIfaceHal.getCurrentNetworkLocalConfig(this.mIfaceName); | 277 | ········final·WifiConfiguration·currentNetworkLocalConfig·=·this.mStaIfaceHal.getCurrentNetworkLocalConfig(this.mIfaceName); |
299 | ········if·(currentNetworkLocalConfig·==·null)·{ | 278 | ········if·(currentNetworkLocalConfig·==·null)·{ |
300 | ············return; | 279 | ············return; |
301 | ········} | 280 | ········} |
Offset 312, 43 lines modified | Offset 291, 16 lines modified |
312 | ········mStaIfaceHal.logCallback(sb.toString()); | 291 | ········mStaIfaceHal.logCallback(sb.toString()); |
313 | ····} | 292 | ····} |
314 | ···· | 293 | ···· |
315 | ····public·void·onStateChanged(final·int·n,·final·byte[]·array,·final·int·n2,·final·ArrayList·list)·{ | 294 | ····public·void·onStateChanged(final·int·n,·final·byte[]·array,·final·int·n2,·final·ArrayList·list)·{ |
316 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onStateChanged(n,·array,·n2,·list); | 295 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onStateChanged(n,·array,·n2,·list); |
317 | ····} | 296 | ····} |
318 | ···· | 297 | ···· |
319 | ····public·void·onStateChanged_1_3(int·mStateIsFourwayV13,·final·byte[]·array,·int·n,·final·ArrayList·list,·final·boolean·b)·{ | 298 | ····public·void·onStateChanged_1_3(final·int·n,·final·byte[]·array,·final·int·n2,·final·ArrayList·list,·final·boolean·b)·{ |
320 | ········this.mStaIfaceHal.logCallback("onStateChanged_1_3"); | 299 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onStateChanged(n,·array,·n2,·list,·b); |
321 | ········final·SupplicantState·supplicantHidlStateToFrameworkState·=·SupplicantStaIfaceCallbackImpl.supplicantHidlStateToFrameworkState(mStateIsFourwayV13); | |
322 | ········final·WifiSsid·fromByteArray·=·WifiSsid.createFromByteArray(NativeUtil.byteArrayFromArrayList(list)); | |
323 | ········final·String·macAddressFromByteArray·=·NativeUtil.macAddressFromByteArray(array); | |
324 | ········if·(mStateIsFourwayV13·==·7)·{ | |
325 | ············mStateIsFourwayV13·=·1; | |
326 | ········} | |
327 | ········else·{ | |
328 | ············mStateIsFourwayV13·=·0; | |
329 | ········} | |
330 | ········this.mStateIsFourwayV13·=·(mStateIsFourwayV13·!=·0); | |
331 | ········if·(supplicantHidlStateToFrameworkState·==·SupplicantState.COMPLETED)·{ | |
332 | ············if·(b)·{ | |
333 | ················final·WifiMonitor·mWifiMonitor·=·this.mWifiMonitor; | |
334 | ················final·String·mIfaceName·=·this.mIfaceName; | |
335 | ················n·=·this.mStaIfaceHal.getCurrentNetworkId(mIfaceName); | |
336 | ················mWifiMonitor.broadcastFilsNetworkConnectionEvent(mIfaceName,·n,·macAddressFromByteArray); | |
337 | ············} | |
338 | ············else·{ | |
339 | ················final·WifiMonitor·mWifiMonitor2·=·this.mWifiMonitor; | |
340 | ················final·String·mIfaceName2·=·this.mIfaceName; | |
341 | ················n·=·this.mStaIfaceHal.getCurrentNetworkId(mIfaceName2); | |
342 | ················mWifiMonitor2.broadcastNetworkConnectionEvent(mIfaceName2,·n,·macAddressFromByteArray); | |
343 | ············} | |
344 | ········} | |
345 | ········final·WifiMonitor·mWifiMonitor3·=·this.mWifiMonitor; | |
346 | ········final·String·mIfaceName3·=·this.mIfaceName; | |
347 | ········mWifiMonitor3.broadcastSupplicantStateChangeEvent(mIfaceName3,·this.mStaIfaceHal.getCurrentNetworkId(mIfaceName3),·fromByteArray,·macAddressFromByteArray,·supplicantHidlStateToFrameworkState); | |
348 | ····} | 300 | ····} |
349 | ···· | 301 | ···· |
350 | ····public·void·onWpsEventFail(final·byte[]·array,·final·short·n,·final·short·n2)·{ | 302 | ····public·void·onWpsEventFail(final·byte[]·array,·final·short·n,·final·short·n2)·{ |
351 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onWpsEventFail(array,·n,·n2); | 303 | ········((SupplicantStaIfaceCallbackV1_2Impl)this.mCallbackV12).onWpsEventFail(array,·n,·n2); |
352 | ····} | 304 | ····} |
353 | ···· | 305 | ···· |
354 | ····public·void·onWpsEventPbcOverlap()·{ | 306 | ····public·void·onWpsEventPbcOverlap()·{ |