From c271393067844eae77a4f7a651163b1eaba9e6b7 Mon Sep 17 00:00:00 2001 From: "Nate(Qiang) Jiang" Date: Tue, 19 Nov 2019 14:08:21 -0800 Subject: [NetworkSuggestion] store the share credential with user flag. Bug: 142134651 Test: atest android.net.wifi Test: atest com.android.server.wifi Change-Id: If26193c2de55ddbf83b73c2b8ac5fc827dea78cc --- .../com/android/server/wifi/NetworkSuggestionStoreData.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java b/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java index 810600b68..9641f5c16 100644 --- a/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java +++ b/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java @@ -63,6 +63,8 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData { "WifiEnterpriseConfiguration"; private static final String XML_TAG_IS_APP_INTERACTION_REQUIRED = "IsAppInteractionRequired"; private static final String XML_TAG_IS_USER_INTERACTION_REQUIRED = "IsUserInteractionRequired"; + private static final String XML_TAG_IS_USER_ALLOWED_TO_MANUALLY_CONNECT = + "IsUserAllowedToManuallyConnect"; 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"; @@ -230,6 +232,8 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData { suggestion.isAppInteractionRequired); XmlUtil.writeNextValue(out, XML_TAG_IS_USER_INTERACTION_REQUIRED, suggestion.isUserInteractionRequired); + XmlUtil.writeNextValue(out, XML_TAG_IS_USER_ALLOWED_TO_MANUALLY_CONNECT, + suggestion.isUserAllowedToManuallyConnect); XmlUtil.writeNextValue(out, XML_TAG_SUGGESTOR_UID, suggestion.suggestorUid); XmlUtil.writeNextValue(out, XML_TAG_SUGGESTOR_PACKAGE_NAME, suggestion.suggestorPackageName); @@ -319,6 +323,7 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData { PasspointConfiguration passpointConfiguration = null; boolean isAppInteractionRequired = false; boolean isUserInteractionRequired = false; + boolean isUserAllowedToManuallyConnect = false; // Backward compatibility. int suggestorUid = Process.INVALID_UID; String suggestorPackageName = null; @@ -335,6 +340,9 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData { case XML_TAG_IS_USER_INTERACTION_REQUIRED: isUserInteractionRequired = (boolean) value; break; + case XML_TAG_IS_USER_ALLOWED_TO_MANUALLY_CONNECT: + isUserAllowedToManuallyConnect = (boolean) value; + break; case XML_TAG_SUGGESTOR_UID: suggestorUid = (int) value; break; @@ -402,7 +410,8 @@ public class NetworkSuggestionStoreData implements WifiConfigStore.StoreData { } return new WifiNetworkSuggestion( wifiConfiguration, passpointConfiguration, isAppInteractionRequired, - isUserInteractionRequired, suggestorUid, suggestorPackageName); + isUserInteractionRequired, isUserAllowedToManuallyConnect, + suggestorUid, suggestorPackageName); } } -- cgit v1.2.3