summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Jiang <qiangjiang@google.com>2020-03-16 16:58:05 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-03-16 16:58:05 +0000
commit404b1fd319027505e33e51d677e7c6dcc19c9055 (patch)
treede7451118b675cd04fc790e03db89c2a69482564
parente515bfc4b3c2e39be82459e39f8a47b93302471c (diff)
parentf3540497d1d1a15eaf645037515cdaba38db3d00 (diff)
Merge "Persist trust network bit inside WifiConfiguration" into rvc-dev
-rw-r--r--service/java/com/android/server/wifi/NetworkSuggestionStoreData.java6
-rw-r--r--service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java8
-rw-r--r--service/java/com/android/server/wifi/util/XmlUtil.java6
-rw-r--r--tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java4
-rw-r--r--tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java2
-rw-r--r--tests/wifitests/src/com/android/server/wifi/NetworkSuggestionStoreDataTest.java20
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java8
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java1
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java292
9 files changed, 138 insertions, 209 deletions
diff --git a/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java b/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java
index 05cf4cc92..169e87db9 100644
--- a/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java
+++ b/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java
@@ -67,7 +67,6 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData {
"IsUserAllowedToManuallyConnect";
private static final String XML_TAG_IS_INITIALIZED_AUTO_JOIN = "InitializedAutoJoinEnabled";
private static final String XML_TAG_IS_AUTO_JOIN = "AutoJoinEnabled";
- private static final String XML_TAG_IS_NETWORK_UNTRUSTED = "IsNetworkUntrusted";
private static final String XML_TAG_SUGGESTOR_UID = "SuggestorUid";
private static final String XML_TAG_SUGGESTOR_PACKAGE_NAME = "SuggestorPackageName";
private static final String XML_TAG_SUGGESTOR_FEATURE_ID = "SuggestorFeatureId";
@@ -249,7 +248,6 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData {
suggestion.isInitialAutoJoinEnabled);
XmlUtil.writeNextValue(out, XML_TAG_IS_AUTO_JOIN,
extSuggestion.isAutojoinEnabled);
- XmlUtil.writeNextValue(out, XML_TAG_IS_NETWORK_UNTRUSTED, suggestion.isNetworkUntrusted);
XmlUtil.writeNextSectionEnd(out, XML_TAG_SECTION_HEADER_NETWORK_SUGGESTION);
}
@@ -409,8 +407,6 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData {
// Only needed for migration of data from Q to R.
suggestorUid = (int) value;
break;
- case XML_TAG_IS_NETWORK_UNTRUSTED:
- isNetworkUntrusted = (boolean) value;
default:
Log.w(TAG, "Ignoring unknown value name found: " + valueName[0]);
break;
@@ -473,7 +469,7 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData {
}
return Pair.create(new WifiNetworkSuggestion(wifiConfiguration, passpointConfiguration,
isAppInteractionRequired, isUserInteractionRequired, isUserAllowedToManuallyConnect,
- isInitializedAutoJoinEnabled, isNetworkUntrusted), isAutoJoinEnabled);
+ isInitializedAutoJoinEnabled), isAutoJoinEnabled);
}
}
diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
index 5f4f1a1e9..b0b1251d2 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
@@ -851,7 +851,7 @@ public class WifiNetworkSuggestionsManager {
// Install Passpoint config, if failure, ignore that suggestion
if (!mWifiInjector.getPasspointManager().addOrUpdateProvider(
ewns.wns.passpointConfiguration, uid,
- packageName, true, !ewns.wns.isNetworkUntrusted)) {
+ packageName, true, !ewns.wns.isUntrusted())) {
Log.e(TAG, "Passpoint profile install failure for FQDN: "
+ ewns.wns.wifiConfiguration.FQDN);
continue;
@@ -1178,11 +1178,7 @@ public class WifiNetworkSuggestionsManager {
WifiConfiguration network = mWifiConfigManager
.getConfiguredNetwork(ewns.wns.getWifiConfiguration().getKey());
if (network == null) {
- network = new WifiConfiguration(ewns.wns.getWifiConfiguration());
- network.ephemeral = true;
- network.fromWifiNetworkSuggestion = true;
- network.allowAutojoin = ewns.isAutojoinEnabled;
- network.trusted = !ewns.wns.isNetworkUntrusted;
+ network = ewns.createInternalWifiConfiguration();
}
networks.add(network);
}
diff --git a/service/java/com/android/server/wifi/util/XmlUtil.java b/service/java/com/android/server/wifi/util/XmlUtil.java
index 906f99802..94d60e756 100644
--- a/service/java/com/android/server/wifi/util/XmlUtil.java
+++ b/service/java/com/android/server/wifi/util/XmlUtil.java
@@ -354,6 +354,7 @@ public class XmlUtil {
public static final String XML_TAG_MAC_RANDOMIZATION_SETTING = "MacRandomizationSetting";
public static final String XML_TAG_CARRIER_ID = "CarrierId";
public static final String XML_TAG_IS_AUTO_JOIN = "AutoJoinEnabled";
+ public static final String XML_TAG_IS_TRUSTED = "Trusted";
/**
* Write WepKeys to the XML stream.
@@ -454,6 +455,8 @@ public class XmlUtil {
configuration.allowedSuiteBCiphers.toByteArray());
XmlUtil.writeNextValue(out, XML_TAG_SHARED, configuration.shared);
XmlUtil.writeNextValue(out, XML_TAG_IS_AUTO_JOIN, configuration.allowAutojoin);
+ XmlUtil.writeNextValue(out, XML_TAG_IS_TRUSTED, configuration.trusted);
+
}
/**
@@ -707,6 +710,9 @@ public class XmlUtil {
case XML_TAG_IS_AUTO_JOIN:
configuration.allowAutojoin = (boolean) value;
break;
+ case XML_TAG_IS_TRUSTED:
+ configuration.trusted = (boolean) value;
+ break;
default:
Log.w(TAG, "Ignoring unknown value name found: " + valueName[0]);
break;
diff --git a/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java b/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
index f39870723..d9b711df3 100644
--- a/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
@@ -83,6 +83,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"
+ + "<boolean name=\"Trusted\" value=\"true\" />\n"
+ "<null name=\"BSSID\" />\n"
+ "<int name=\"Status\" value=\"2\" />\n"
+ "<null name=\"FQDN\" />\n"
@@ -137,6 +138,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"
+ + "<boolean name=\"Trusted\" value=\"true\" />\n"
+ "<null name=\"BSSID\" />\n"
+ "<int name=\"Status\" value=\"2\" />\n"
+ "<null name=\"FQDN\" />\n"
@@ -212,6 +214,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"
+ + "<boolean name=\"Trusted\" value=\"true\" />\n"
+ "<null name=\"BSSID\" />\n"
+ "<int name=\"Status\" value=\"2\" />\n"
+ "<null name=\"FQDN\" />\n"
@@ -452,6 +455,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"
+ + "<boolean name=\"Trusted\" value=\"true\" />\n"
+ "<null name=\"BSSID\" />\n"
+ "<null name=\"FQDN\" />\n"
+ "<null name=\"ProviderFriendlyName\" />\n"
diff --git a/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java b/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java
index 643678c8b..17bb4c133 100644
--- a/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java
@@ -1090,7 +1090,7 @@ public class NetworkSuggestionNominatorTest extends WifiBaseTest {
PerAppInfo perAppInfo = new PerAppInfo(uids[i], packageNames[i], null);
WifiNetworkSuggestion suggestion =
new WifiNetworkSuggestion(configs[i], null, appInteractions[i], false,
- shareWithUser[i], true, false);
+ shareWithUser[i], true);
suggestions[i] = new ExtendedWifiNetworkSuggestion(suggestion, perAppInfo, autojoin[i]);
}
return suggestions;
diff --git a/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionStoreDataTest.java b/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionStoreDataTest.java
index afaefbc92..1a5044754 100644
--- a/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionStoreDataTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionStoreDataTest.java
@@ -292,7 +292,7 @@ public class NetworkSuggestionStoreDataTest extends WifiBaseTest {
configuration.enterpriseConfig =
WifiConfigurationTestUtil.createPEAPWifiEnterpriseConfigWithGTCPhase2();
WifiNetworkSuggestion networkSuggestion =
- new WifiNetworkSuggestion(configuration, null, false, false, true, true, false);
+ new WifiNetworkSuggestion(configuration, null, false, false, true, true);
appInfo.hasUserApproved = false;
appInfo.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion, appInfo, true));
@@ -321,8 +321,7 @@ public class NetworkSuggestionStoreDataTest extends WifiBaseTest {
PerAppInfo appInfo1 = new PerAppInfo(TEST_UID_1, TEST_PACKAGE_NAME_1, TEST_FEATURE_ID);
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
appInfo1.hasUserApproved = false;
appInfo1.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion1, appInfo1, true));
@@ -330,8 +329,7 @@ public class NetworkSuggestionStoreDataTest extends WifiBaseTest {
PerAppInfo appInfo2 = new PerAppInfo(TEST_UID_2, TEST_PACKAGE_NAME_2, TEST_FEATURE_ID);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
appInfo2.hasUserApproved = true;
appInfo2.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion2, appInfo2, true));
@@ -349,11 +347,9 @@ public class NetworkSuggestionStoreDataTest extends WifiBaseTest {
PerAppInfo appInfo1 = new PerAppInfo(TEST_UID_1, TEST_PACKAGE_NAME_1, TEST_FEATURE_ID);
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, true, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, true, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- true);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
appInfo1.hasUserApproved = true;
appInfo1.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion1, appInfo1, true));
@@ -363,11 +359,9 @@ public class NetworkSuggestionStoreDataTest extends WifiBaseTest {
PerAppInfo appInfo2 = new PerAppInfo(TEST_UID_2, TEST_PACKAGE_NAME_2, TEST_FEATURE_ID);
WifiNetworkSuggestion networkSuggestion3 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
WifiNetworkSuggestion networkSuggestion4 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, true, true, true,
- true);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, true, true, true);
appInfo2.hasUserApproved = true;
appInfo2.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion3, appInfo2, true));
diff --git a/tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java b/tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java
index cdacea91e..0d3fdf6b6 100644
--- a/tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java
@@ -369,10 +369,10 @@ public class WakeupControllerTest extends WifiBaseTest {
// suggestions
WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork(quotedSsid);
WifiNetworkSuggestion openNetworkSuggestion =
- new WifiNetworkSuggestion(openNetwork, null, false, false, true, true, false);
+ new WifiNetworkSuggestion(openNetwork, null, false, false, true, true);
WifiConfiguration wepNetwork = WifiConfigurationTestUtil.createWepNetwork();
WifiNetworkSuggestion wepNetworkSuggestion =
- new WifiNetworkSuggestion(wepNetwork, null, false, false, true, true, false);
+ new WifiNetworkSuggestion(wepNetwork, null, false, false, true, true);
when(mWifiNetworkSuggestionsManager.getAllNetworkSuggestions())
.thenReturn(new HashSet<>(Arrays.asList(
openNetworkSuggestion, wepNetworkSuggestion)));
@@ -414,7 +414,7 @@ public class WakeupControllerTest extends WifiBaseTest {
WifiConfiguration oweNetwork = WifiConfigurationTestUtil.createOweNetwork(quotedSsid2);
WifiNetworkSuggestion oweNetworkSuggestion =
- new WifiNetworkSuggestion(oweNetwork, null, false, false, true, true, false);
+ new WifiNetworkSuggestion(oweNetwork, null, false, false, true, true);
when(mWifiNetworkSuggestionsManager.getAllNetworkSuggestions())
.thenReturn(new HashSet<>(Arrays.asList(oweNetworkSuggestion)));
@@ -512,7 +512,7 @@ public class WakeupControllerTest extends WifiBaseTest {
WifiConfiguration openNetwork = WifiConfigurationTestUtil
.createOpenNetwork(ScanResultUtil.createQuotedSSID(SAVED_SSID));
WifiNetworkSuggestion openNetworkSuggestion =
- new WifiNetworkSuggestion(openNetwork, null, false, false, true, true, false);
+ new WifiNetworkSuggestion(openNetwork, null, false, false, true, true);
when(mWifiNetworkSuggestionsManager.getAllNetworkSuggestions())
.thenReturn(new HashSet<>(Collections.singletonList(openNetworkSuggestion)));
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
index ea86c4bd6..9f749f579 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
@@ -88,6 +88,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"
+ + "<boolean name=\"Trusted\" value=\"true\" />\n"
+ "<null name=\"BSSID\" />\n"
+ "<int name=\"Status\" value=\"2\" />\n"
+ "<null name=\"FQDN\" />\n"
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
index fc5d06fa0..58a47841f 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
@@ -288,10 +288,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
dummyConfiguration.FQDN = TEST_FQDN;
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- dummyConfiguration, passpointConfiguration, false, false, true, true, false);
+ dummyConfiguration, passpointConfiguration, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -339,10 +338,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
dummyConfiguration.setPasspointUniqueId(passpointConfiguration.getUniqueId());
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- dummyConfiguration, passpointConfiguration, false, false, true, true, false);
+ dummyConfiguration, passpointConfiguration, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -385,11 +383,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testAddRemoveEnterpriseNetworkSuggestion() {
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createEapNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createEapNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createEapNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createEapNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -408,8 +404,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
mWifiNetworkSuggestionsManager.getAllNetworkSuggestions();
assertEquals(1, allNetworkSuggestions.size());
WifiNetworkSuggestion removingSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createEapNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createEapNetwork(), null, false, false, true, true);
removingSuggestion.wifiConfiguration.SSID = networkSuggestion1.wifiConfiguration.SSID;
// Remove with the networkSuggestion from external.
assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
@@ -429,10 +424,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
createTestConfigWithUserCredential(TEST_FQDN, TEST_FRIENDLY_NAME);
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- dummyConfiguration, passpointConfiguration, false, false, true, true, false);
+ dummyConfiguration, passpointConfiguration, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
@@ -472,8 +466,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testReplaceNetworkSuggestionsSuccess() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -505,8 +498,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testAddNetworkSuggestionsSuccessOnInPlaceModification() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -538,8 +530,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
for (int i = 0; i < WifiManager.NETWORK_SUGGESTIONS_MAX_PER_APP_HIGH_RAM; i++) {
networkSuggestionList.add(new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false));
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true));
}
// The first add should succeed.
assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
@@ -551,8 +542,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
networkSuggestionList = new ArrayList<>();
for (int i = 0; i < 3; i++) {
networkSuggestionList.add(new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false));
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true));
}
// The second add should fail.
assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_EXCEEDS_MAX_PER_APP,
@@ -573,8 +563,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
networkSuggestionList = new ArrayList<>();
for (int i = 0; i < 2; i++) {
networkSuggestionList.add(new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false));
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true));
}
// This add should now succeed.
assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
@@ -588,11 +577,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testRemoveNetworkSuggestionsFailureOnInvalid() {
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -618,8 +605,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void
testGetNetworkSuggestionsForScanDetailSuccessWithOneMatchForCarrierProvisioningApp() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -649,8 +635,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testGetNetworkSuggestionsForScanDetailSuccessWithOneMatch() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -678,10 +663,10 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void testGetNetworkSuggestionsForScanDetailSuccessWithMultipleMatch() {
WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createOpenNetwork();
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- wifiConfiguration, null, false, false, true, true, false);
+ wifiConfiguration, null, false, false, true, true);
// Reuse the same network credentials to ensure they both match.
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- wifiConfiguration, null, false, false, true, true, false);
+ wifiConfiguration, null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -723,7 +708,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
wifiConfiguration.BSSID = scanDetail.getBSSIDString();
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- wifiConfiguration, null, false, false, true, true, false);
+ wifiConfiguration, null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -752,10 +737,10 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
wifiConfiguration.BSSID = scanDetail.getBSSIDString();
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- wifiConfiguration, null, false, false, true, true, false);
+ wifiConfiguration, null, false, false, true, true);
// Reuse the same network credentials to ensure they both match.
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- wifiConfiguration, null, false, false, true, true, false);
+ wifiConfiguration, null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -796,10 +781,10 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
wifiConfiguration.BSSID = scanDetail.getBSSIDString();
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- wifiConfiguration, null, false, false, true, true, false);
+ wifiConfiguration, null, false, false, true, true);
// Reuse the same network credentials to ensure they both match.
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- wifiConfiguration, null, false, false, true, true, false);
+ wifiConfiguration, null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -834,10 +819,10 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
wifiConfiguration2.BSSID = scanDetail.getBSSIDString();
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- wifiConfiguration1, null, false, false, true, true, false);
+ wifiConfiguration1, null, false, false, true, true);
// Reuse the same network credentials to ensure they both match.
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- wifiConfiguration2, null, false, false, true, true, false);
+ wifiConfiguration2, null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -885,8 +870,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testGetNetworkSuggestionsForScanDetailFailureOnAppNotApproved() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -908,7 +892,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void testGetNetworkSuggestionsForScanDetailFailureOnSuggestionRemoval() {
WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createOpenNetwork();
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- wifiConfiguration, null, false, false, true, true, false);
+ wifiConfiguration, null, false, false, true, true);
ScanDetail scanDetail = createScanDetailForNetwork(wifiConfiguration);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -936,8 +920,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testGetNetworkSuggestionsForScanDetailFailureOnWrongNetwork() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -968,8 +951,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
.registerSuggestionConnectionStatusListener(mBinder, mListener,
NETWORK_CALLBACK_ID, TEST_PACKAGE_1));
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1008,8 +990,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
when(mTelephonyUtil.getCarrierIdForPackageWithCarrierPrivileges(TEST_PACKAGE_1))
.thenReturn(TEST_CARRIER_ID);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createPskNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createPskNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1059,8 +1040,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
.thenReturn(true);
WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- new WifiConfiguration(config), null, true, false, true, true,
- false);
+ new WifiConfiguration(config), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion1);
@@ -1070,8 +1050,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
TEST_PACKAGE_1, TEST_FEATURE));
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- new WifiConfiguration(config), null, true, false, true, true,
- false);
+ new WifiConfiguration(config), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList2 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion2);
@@ -1106,8 +1085,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
NETWORK_CALLBACK_ID, TEST_PACKAGE_1));
verify(mBinder).linkToDeath(drCaptor.capture(), anyInt());
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1156,8 +1134,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
.registerSuggestionConnectionStatusListener(mBinder, mListener,
NETWORK_CALLBACK_ID, TEST_PACKAGE_1));
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1200,13 +1177,13 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void testOnNetworkConnectionSuccessWithMultipleMatch() {
WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createOpenNetwork();
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- wifiConfiguration, null, true, false, true, true, false);
+ wifiConfiguration, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion1);
}};
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- wifiConfiguration, null, true, false, true, true, false);
+ wifiConfiguration, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList2 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion2);
@@ -1261,13 +1238,13 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createOpenNetwork();
wifiConfiguration.BSSID = TEST_BSSID;
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- wifiConfiguration, null, true, false, true, true, false);
+ wifiConfiguration, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion1);
}};
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- wifiConfiguration, null, true, false, true, true, false);
+ wifiConfiguration, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList2 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion2);
@@ -1322,13 +1299,13 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration wifiConfiguration2 = new WifiConfiguration(wifiConfiguration1);
wifiConfiguration2.BSSID = TEST_BSSID;
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- wifiConfiguration1, null, true, false, true, true, false);
+ wifiConfiguration1, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion1);
}};
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- wifiConfiguration2, null, true, false, true, true, false);
+ wifiConfiguration2, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList2 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion2);
@@ -1383,8 +1360,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testOnNetworkConnectionWhenAppNotApproved() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1424,8 +1400,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testOnNetworkConnectionWhenIsAppInteractionRequiredNotSet() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1465,8 +1440,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testOnNetworkConnectionWhenAppDoesNotHoldLocationPermission() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1505,8 +1479,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testAddNetworkSuggestionsConfigStoreWrite() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -1547,8 +1520,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testRemoveNetworkSuggestionsConfigStoreWrite() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -1588,10 +1560,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
PerAppInfo appInfo = new PerAppInfo(TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE);
appInfo.hasUserApproved = true;
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- dummyConfiguration, passpointConfiguration, false, false, true, true, false);
+ dummyConfiguration, passpointConfiguration, false, false, true, true);
appInfo.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion, appInfo, true));
appInfo.extNetworkSuggestions.add(
@@ -1648,8 +1619,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
PerAppInfo appInfo1 = new PerAppInfo(TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE);
appInfo1.hasUserApproved = true;
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
appInfo1.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion1, appInfo1, true));
mDataSource.fromDeserialized(new HashMap<String, PerAppInfo>() {{
@@ -1662,8 +1632,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
PerAppInfo appInfo2 = new PerAppInfo(TEST_UID_2, TEST_PACKAGE_2, TEST_FEATURE);
appInfo2.hasUserApproved = true;
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
appInfo2.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion2, appInfo2, true));
mDataSource.fromDeserialized(new HashMap<String, PerAppInfo>() {{
@@ -1701,8 +1670,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void
testRemoveNetworkSuggestionsMatchingConnectionSuccessWithOneMatch() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1737,8 +1705,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void
testRemoveAllNetworkSuggestionsMatchingConnectionSuccessWithOneMatch() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1775,13 +1742,13 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void testRemoveAppMatchingConnectionSuccessWithMultipleMatch() {
WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createOpenNetwork();
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- wifiConfiguration, null, true, false, true, true, false);
+ wifiConfiguration, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion1);
}};
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- wifiConfiguration, null, true, false, true, true, false);
+ wifiConfiguration, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList2 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion2);
@@ -1823,8 +1790,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testRemoveAppNotMatchingConnectionSuccess() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1851,8 +1817,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testRemoveNetworkSuggestionsNotMatchingConnectionSuccessAfterConnectionFailure() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -1888,11 +1853,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testAddRemoveNetworkSuggestionsStartStopAppOpsWatch() {
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -1937,8 +1900,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testAppOpsChangeAfterSuggestionsAdd() {
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion1);
@@ -1989,8 +1951,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void testAppOpsChangeAfterConfigStoreLoad() {
PerAppInfo appInfo = new PerAppInfo(TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
appInfo.extNetworkSuggestions.add(
ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion, appInfo, true));
mDataSource.fromDeserialized(new HashMap<String, PerAppInfo>() {{
@@ -2036,8 +1997,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testAppOpsChangeWrongUid() {
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion1);
@@ -2079,11 +2039,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testRemoveApp() {
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -2145,11 +2103,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testClear() {
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
@@ -2202,8 +2158,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testUserApprovalNotificationDismissalWhenGetScanResult() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2243,8 +2198,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testUserApprovalNotificationClickOnAllowWhenGetScanResult() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2289,8 +2243,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testUserApprovalNotificationClickOnDisallowWhenGetScanResult() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2358,8 +2311,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testUserApprovalNotificationWhilePreviousNotificationActive() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2397,17 +2349,13 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
// App add network suggestions then get stored suggestions.
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOweNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOweNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion3 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createSaeNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createSaeNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion4 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createPskNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createPskNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion1);
networkSuggestionList.add(networkSuggestion2);
@@ -2438,14 +2386,11 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void testGetHiddenNetworks() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
WifiNetworkSuggestion hiddenNetworkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createPskHiddenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createPskHiddenNetwork(), null, true, false, true, true);
WifiNetworkSuggestion hiddenNetworkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createPskHiddenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createPskHiddenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList1 =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2479,8 +2424,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
when(mActivityManager.getPackageImportance(any())).thenReturn(IMPORTANCE_FOREGROUND);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2519,8 +2463,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
when(mActivityManager.getPackageImportance(any())).thenReturn(IMPORTANCE_FOREGROUND);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2577,8 +2520,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
when(mActivityManager.getPackageImportance(any())).thenReturn(IMPORTANCE_FOREGROUND);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2614,8 +2556,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testUserApprovalNotificationClickOnAllowDuringAddingSuggestionsFromNonFgApp() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2649,8 +2590,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testUserApprovalNotificationClickOnDisallowWhenAddSuggestionsFromNonFgApp() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2710,7 +2650,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
createTestConfigWithUserCredential(TEST_FQDN, TEST_FRIENDLY_NAME);
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- dummyConfiguration, passpointConfiguration, true, false, true, true, false);
+ dummyConfiguration, passpointConfiguration, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -2845,7 +2785,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
config.carrierId = VALID_CARRIER_ID;
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- config, null, true, false, true, true, false);
+ config, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
@@ -2863,7 +2803,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
config.carrierId = VALID_CARRIER_ID;
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- config, null, true, false, true, true, false);
+ config, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
@@ -2880,7 +2820,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void testAddSuggestionWithDefaultCarrierIdWithoutCarrierProvisionPermission() {
WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- config, null, true, false, true, true, false);
+ config, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
@@ -2902,7 +2842,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
dummyConfiguration.FQDN = TEST_FQDN;
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(dummyConfiguration,
- passpointConfiguration, true, false, true, true, false);
+ passpointConfiguration, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mPasspointManager.addOrUpdateProvider(any(PasspointConfiguration.class),
@@ -2926,7 +2866,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
dummyConfiguration.FQDN = TEST_FQDN;
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(dummyConfiguration,
- passpointConfiguration, true, false, true, true, false);
+ passpointConfiguration, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
dummyConfiguration.creatorUid = TEST_UID_1;
@@ -2949,7 +2889,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
dummyConfiguration.FQDN = TEST_FQDN;
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(dummyConfiguration,
- passpointConfiguration, true, false, true, true, false);
+ passpointConfiguration, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
dummyConfiguration.creatorUid = TEST_UID_1;
@@ -2982,7 +2922,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
dummyConfiguration.FQDN = TEST_FQDN;
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(dummyConfiguration,
- passpointConfiguration, true, false, false, true, false);
+ passpointConfiguration, true, false, false, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mPasspointManager.addOrUpdateProvider(any(PasspointConfiguration.class),
@@ -3008,14 +2948,11 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testGetWifiConfigForMatchedNetworkSuggestionsSharedWithUser() {
WifiNetworkSuggestion networkSuggestion1 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
WifiNetworkSuggestion networkSuggestion2 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createPskNetwork(), null, false, false, false, true,
- false);
+ WifiConfigurationTestUtil.createPskNetwork(), null, false, false, false, true);
WifiNetworkSuggestion networkSuggestion3 = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createPskNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createPskNetwork(), null, false, false, true, true);
List<ScanResult> scanResults = new ArrayList<>();
scanResults.add(
createScanDetailForNetwork(networkSuggestion1.wifiConfiguration).getScanResult());
@@ -3081,7 +3018,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfigurationTestUtil.createEapNetwork(WifiEnterpriseConfig.Eap.SIM,
WifiEnterpriseConfig.Phase2.NONE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- config, null, true, false, true, true, false);
+ config, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
@@ -3104,7 +3041,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfigurationTestUtil.createEapNetwork(WifiEnterpriseConfig.Eap.SIM,
WifiEnterpriseConfig.Phase2.NONE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- config, null, true, false, true, true, false);
+ config, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
@@ -3127,7 +3064,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfigurationTestUtil.createEapNetwork(WifiEnterpriseConfig.Eap.SIM,
WifiEnterpriseConfig.Phase2.NONE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- config, null, true, false, true, true, false);
+ config, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
@@ -3150,7 +3087,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfigurationTestUtil.createEapNetwork(WifiEnterpriseConfig.Eap.SIM,
WifiEnterpriseConfig.Phase2.NONE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- config, null, true, false, true, true, false);
+ config, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
@@ -3186,7 +3123,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfigurationTestUtil.createEapNetwork(WifiEnterpriseConfig.Eap.SIM,
WifiEnterpriseConfig.Phase2.NONE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- config, null, true, false, true, true, false);
+ config, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
networkSuggestionList.add(networkSuggestion);
when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
@@ -3207,8 +3144,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED, status);
networkSuggestionList.clear();
networkSuggestionList.add(new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
- false));
+ WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true));
status = mWifiNetworkSuggestionsManager
.add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE);
assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS, status);
@@ -3221,8 +3157,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
@Test
public void testSetAllowAutoJoinOnSuggestionNetwork() {
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
- false);
+ WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -3264,7 +3199,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
createTestConfigWithUserCredential(TEST_FQDN, TEST_FRIENDLY_NAME);
WifiConfiguration dummyConfiguration = createDummyWifiConfigurationForPasspoint(TEST_FQDN);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- dummyConfiguration, passpointConfiguration, false, false, true, true, false);
+ dummyConfiguration, passpointConfiguration, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -3316,10 +3251,10 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
dummyConfiguration.FQDN = TEST_FQDN;
PasspointConfiguration mockPasspoint = mock(PasspointConfiguration.class);
WifiNetworkSuggestion passpointSuggestion = new WifiNetworkSuggestion(
- dummyConfiguration, mockPasspoint, false, false, true, true, false);
+ dummyConfiguration, mockPasspoint, false, false, true, true);
WifiNetworkSuggestion nonPasspointSuggestion = new WifiNetworkSuggestion(
WifiConfigurationTestUtil.createOpenNetwork(),
- null, false, false, true, true, false);
+ null, false, false, true, true);
List<WifiNetworkSuggestion> suggestions = new ArrayList<>() {{
add(passpointSuggestion);
add(nonPasspointSuggestion);
@@ -3370,7 +3305,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void getMatchingScanResultsTestWithMatchNothing() {
WifiNetworkSuggestion nonPasspointSuggestion = new WifiNetworkSuggestion(
WifiConfigurationTestUtil.createOpenNetwork(),
- null, false, false, true, true, false);
+ null, false, false, true, true);
List<WifiNetworkSuggestion> suggestions = new ArrayList<>() {{
add(nonPasspointSuggestion);
}};
@@ -3407,7 +3342,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
public void getMatchingScanResultsTestWithInvalidWifiConfiguration() {
WifiNetworkSuggestion nonPasspointSuggestion = new WifiNetworkSuggestion(
WifiConfigurationTestUtil.createOpenNetwork(),
- null, false, false, true, true, false);
+ null, false, false, true, true);
List<WifiNetworkSuggestion> suggestions = new ArrayList<>() {{
add(nonPasspointSuggestion);
}};
@@ -3445,8 +3380,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration eapSimConfig = WifiConfigurationTestUtil.createEapNetwork(
WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- eapSimConfig, null, true, false, true, true,
- false);
+ eapSimConfig, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -3491,8 +3425,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration eapSimConfig = WifiConfigurationTestUtil.createEapNetwork(
WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- eapSimConfig, null, true, false, true, true,
- false);
+ eapSimConfig, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -3540,8 +3473,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration eapSimConfig = WifiConfigurationTestUtil.createEapNetwork(
WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE);
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(
- eapSimConfig, null, true, false, true, true,
- false);
+ eapSimConfig, null, true, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -3566,7 +3498,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration invalidConfig = WifiConfigurationTestUtil.createOpenNetwork();
invalidConfig.SSID = "";
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(invalidConfig,
- null, false, false, true, true, false);
+ null, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -3588,7 +3520,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration dummyConfig = new WifiConfiguration();
dummyConfig.FQDN = TEST_FQDN;
WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion(dummyConfig,
- passpointConfiguration, false, false, true, true, false);
+ passpointConfiguration, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);
@@ -3611,9 +3543,9 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest {
WifiConfiguration dummyConfig = new WifiConfiguration();
dummyConfig.FQDN = TEST_FQDN;
WifiNetworkSuggestion networkSuggestion =
- new WifiNetworkSuggestion(network1, null, false, false, true, true, false);
+ new WifiNetworkSuggestion(network1, null, false, false, true, true);
WifiNetworkSuggestion passpointSuggestion = new WifiNetworkSuggestion(dummyConfig,
- passpointConfiguration, false, false, true, true, false);
+ passpointConfiguration, false, false, true, true);
List<WifiNetworkSuggestion> networkSuggestionList =
new ArrayList<WifiNetworkSuggestion>() {{
add(networkSuggestion);