diff options
author | Les Lee <lesl@google.com> | 2020-03-11 09:35:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-11 09:35:05 +0000 |
commit | 7f39a020bc43910aedd6559fb2117494ca5a5e24 (patch) | |
tree | db5e478403c6a07bffde91a012901a7b40ea1875 /service | |
parent | 22a0e13df9041d2e977209441dc61e27472297d4 (diff) | |
parent | 0df9f8946fbfef556a8cc59deb8b52d4fbb7ae7a (diff) |
Merge "wifi: Add bssid in SoftAp Store" into rvc-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/SoftApStoreData.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/SoftApStoreData.java b/service/java/com/android/server/wifi/SoftApStoreData.java index deea15ae1..6ed81428f 100644 --- a/service/java/com/android/server/wifi/SoftApStoreData.java +++ b/service/java/com/android/server/wifi/SoftApStoreData.java @@ -44,6 +44,7 @@ public class SoftApStoreData implements WifiConfigStore.StoreData { private static final String TAG = "SoftApStoreData"; private static final String XML_TAG_SECTION_HEADER_SOFTAP = "SoftAp"; private static final String XML_TAG_SSID = "SSID"; + private static final String XML_TAG_BSSID = "Bssid"; private static final String XML_TAG_BAND = "Band"; private static final String XML_TAG_CHANNEL = "Channel"; private static final String XML_TAG_HIDDEN_SSID = "HiddenSSID"; @@ -107,6 +108,9 @@ public class SoftApStoreData implements WifiConfigStore.StoreData { SoftApConfiguration softApConfig = mDataSource.toSerialize(); if (softApConfig != null) { XmlUtil.writeNextValue(out, XML_TAG_SSID, softApConfig.getSsid()); + if (softApConfig.getBssid() != null) { + XmlUtil.writeNextValue(out, XML_TAG_BSSID, softApConfig.getBssid().toString()); + } XmlUtil.writeNextValue(out, XML_TAG_AP_BAND, softApConfig.getBand()); XmlUtil.writeNextValue(out, XML_TAG_CHANNEL, softApConfig.getChannel()); XmlUtil.writeNextValue(out, XML_TAG_HIDDEN_SSID, softApConfig.isHiddenSsid()); @@ -159,6 +163,7 @@ public class SoftApStoreData implements WifiConfigStore.StoreData { int securityType = SoftApConfiguration.SECURITY_TYPE_OPEN; String passphrase = null; String ssid = null; + String bssid = null; // Note that, during deserializaion, we may read the old band encoding (XML_TAG_BAND) // or the new band encoding (XML_TAG_AP_BAND) that is used after the introduction of the // 6GHz band. If the old encoding is found, a conversion is done. @@ -180,6 +185,10 @@ public class SoftApStoreData implements WifiConfigStore.StoreData { ssid = (String) value; softApConfigBuilder.setSsid((String) value); break; + case XML_TAG_BSSID: + bssid = (String) value; + softApConfigBuilder.setBssid(MacAddress.fromString(bssid)); + break; case XML_TAG_BAND: apBand = ApConfigUtil.convertWifiConfigBandToSoftApConfigBand( (int) value); |