diff options
author | Xiao Ma <xiaom@google.com> | 2020-04-16 05:56:46 +0000 |
---|---|---|
committer | Xiao Ma <xiaom@google.com> | 2020-04-16 06:43:37 +0000 |
commit | bfe73b182d85930ea04d0c2cdce2c73674fc3b6f (patch) | |
tree | 000824460d58cc6d8901bf74840f365efd89c6a0 /service | |
parent | 73ecfa71e9e35568b55e00745c2dc83cde44d2d1 (diff) |
Replace confirmConfiguration with updateLayer2Information.
Since updateLayer2Information has updated such BSSID, L2Key and
GroupHint information, we can check if the initial connection has
been established or L2 roaming happened with this method instead of
confirmConfiguration. Otherwise, it seems that we impose a calling
rule for the caller: *must* call updateLayer2Information first and
then confirmConfiguration followed. Ideally, we should deal with
this case only with one metohd.
Bug: 131797393
Test: atest FrameworksWifiTests
Merged-In: I623c83dbcc6b14ea59fda1d68e9b15f09fc64f06
Change-Id: I623c83dbcc6b14ea59fda1d68e9b15f09fc64f06
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 4ca7716c9..99fa7f585 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -3904,7 +3904,17 @@ public class ClientModeImpl extends StateMachine { // interest (e.g. routers); harmless if none are configured. if (state == SupplicantState.COMPLETED) { if (mIpClient != null) { - mIpClient.confirmConfiguration(); + MacAddress lastBssid = null; + try { + lastBssid = (mLastBssid != null) + ? MacAddress.fromString(mLastBssid) : null; + } catch (IllegalArgumentException e) { + Log.e(TAG, "Invalid BSSID format: " + mLastBssid); + } + final Layer2Information info = new Layer2Information( + mLastL2KeyAndGroupHint.first, mLastL2KeyAndGroupHint.second, + lastBssid); + mIpClient.updateLayer2Information(info); } mWifiScoreReport.noteIpCheck(); } |