summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2020-01-22 07:40:53 -0800
committerRoshan Pius <rpius@google.com>2020-01-22 18:20:40 -0800
commit055b79fe239c0f261fc52a1de5263ff429342633 (patch)
tree318a0f43bf3c407ea93cb6c0997bc08529c410e6 /tests
parentd0529d8da729ae2612f426e9c549a2b98708d189 (diff)
WifiBackupRestore: Stop backup/restore of BSSID
Setting BSSID in WifiConfiguration is generally only done by apps. Regular user saved networks (preservation of which is the intention of backup/restore) don't set the BSSID field.So, don't backup or restore this field. Bug: 142741121 Test: atest com.android.server.wifi Change-Id: I481dc1c92f1a79a18dfe5320a2df65abfb4fcc50
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java9
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java2
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java b/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
index 357518d76..3c5cd8a88 100644
--- a/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
@@ -66,7 +66,6 @@ public class NetworkListStoreDataTest extends WifiBaseTest {
+ "<WifiConfiguration>\n"
+ "<string name=\"ConfigKey\">%s</string>\n"
+ "<string name=\"SSID\">%s</string>\n"
- + "<null name=\"BSSID\" />\n"
+ "<null name=\"PreSharedKey\" />\n"
+ "<null name=\"SaePasswordId\" />\n"
+ "<null name=\"WEPKeys\" />\n"
@@ -82,6 +81,7 @@ public class NetworkListStoreDataTest extends WifiBaseTest {
+ "<byte-array name=\"AllowedSuiteBCiphers\" num=\"0\"></byte-array>\n"
+ "<boolean name=\"Shared\" value=\"%s\" />\n"
+ "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
+ + "<null name=\"BSSID\" />\n"
+ "<int name=\"Status\" value=\"2\" />\n"
+ "<null name=\"FQDN\" />\n"
+ "<null name=\"ProviderFriendlyName\" />\n"
@@ -121,7 +121,6 @@ public class NetworkListStoreDataTest extends WifiBaseTest {
+ "<WifiConfiguration>\n"
+ "<string name=\"ConfigKey\">%s</string>\n"
+ "<string name=\"SSID\">%s</string>\n"
- + "<null name=\"BSSID\" />\n"
+ "<null name=\"PreSharedKey\" />\n"
+ "<null name=\"SaePasswordId\" />\n"
+ "<null name=\"WEPKeys\" />\n"
@@ -137,6 +136,7 @@ public class NetworkListStoreDataTest extends WifiBaseTest {
+ "<byte-array name=\"AllowedSuiteBCiphers\" num=\"0\"></byte-array>\n"
+ "<boolean name=\"Shared\" value=\"%s\" />\n"
+ "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
+ + "<null name=\"BSSID\" />\n"
+ "<int name=\"Status\" value=\"2\" />\n"
+ "<null name=\"FQDN\" />\n"
+ "<null name=\"ProviderFriendlyName\" />\n"
@@ -196,7 +196,6 @@ public class NetworkListStoreDataTest extends WifiBaseTest {
+ "<WifiConfiguration>\n"
+ "<string name=\"ConfigKey\">%s</string>\n"
+ "<string name=\"SSID\">%s</string>\n"
- + "<null name=\"BSSID\" />\n"
+ "<string name=\"PreSharedKey\">&quot;WifiConfigurationTestUtilPsk&quot;"
+ "</string>\n"
+ "<null name=\"SaePasswordId\" />\n"
@@ -213,6 +212,7 @@ public class NetworkListStoreDataTest extends WifiBaseTest {
+ "<byte-array name=\"AllowedSuiteBCiphers\" num=\"0\"></byte-array>\n"
+ "<boolean name=\"Shared\" value=\"%s\" />\n"
+ "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
+ + "<null name=\"BSSID\" />\n"
+ "<int name=\"Status\" value=\"2\" />\n"
+ "<null name=\"FQDN\" />\n"
+ "<null name=\"ProviderFriendlyName\" />\n"
@@ -437,7 +437,6 @@ public class NetworkListStoreDataTest extends WifiBaseTest {
+ "<WifiConfiguration>\n"
+ "<string name=\"ConfigKey\">%s</string>\n"
+ "<string name=\"SSID\">%s</string>\n"
- + "<null name=\"BSSID\" />\n"
+ "<null name=\"PreSharedKey\" />\n"
+ "<null name=\"WEPKeys\" />\n"
+ "<int name=\"WEPTxKeyIndex\" value=\"0\" />\n"
@@ -451,6 +450,8 @@ public class NetworkListStoreDataTest extends WifiBaseTest {
+ "<byte-array name=\"AllowedGroupMgmtCiphers\" num=\"0\"></byte-array>\n"
+ "<byte-array name=\"AllowedSuiteBCiphers\" num=\"0\"></byte-array>\n"
+ "<boolean name=\"Shared\" value=\"%s\" />\n"
+ + "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
+ + "<null name=\"BSSID\" />\n"
+ "<null name=\"FQDN\" />\n"
+ "<null name=\"ProviderFriendlyName\" />\n"
+ "<null name=\"LinkedNetworksList\" />\n"
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
index bbe064eae..fea3eb2a4 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
@@ -74,7 +74,6 @@ public class WifiConfigStoreTest extends WifiBaseTest {
+ "<WifiConfiguration>\n"
+ "<string name=\"ConfigKey\">%s</string>\n"
+ "<string name=\"SSID\">%s</string>\n"
- + "<null name=\"BSSID\" />\n"
+ "<null name=\"PreSharedKey\" />\n"
+ "<null name=\"SaePasswordId\" />\n"
+ "<null name=\"WEPKeys\" />\n"
@@ -90,6 +89,7 @@ public class WifiConfigStoreTest extends WifiBaseTest {
+ "<byte-array name=\"AllowedSuiteBCiphers\" num=\"0\"></byte-array>\n"
+ "<boolean name=\"Shared\" value=\"%s\" />\n"
+ "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
+ + "<null name=\"BSSID\" />\n"
+ "<int name=\"Status\" value=\"2\" />\n"
+ "<null name=\"FQDN\" />\n"
+ "<null name=\"ProviderFriendlyName\" />\n"