From 999d26c6181747c8cf1151bb0729d4b4a31886da Mon Sep 17 00:00:00 2001 From: Nate Jiang Date: Mon, 9 Sep 2019 16:17:44 -0700 Subject: [PATCH] [NetworkSuggestion] allow apps in-place modify suggestion Changing the comments. Bug: 138447131 Test: atest android.net.wifi Test: atest com.android.server.wifi Change-Id: Ia02033a53ba67f3cf5106a8c4996c3d24a65672a --- wifi/java/android/net/wifi/WifiManager.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index a37de00ce7dea..0fa0ec7afd919 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -1732,13 +1732,12 @@ public class WifiManager { *
  • When an app is uninstalled, all its suggested networks are discarded. If the device is * currently connected to a suggested network which is being removed then the device will * disconnect from that network.
  • - *
  • No in-place modification of existing suggestions are allowed. Apps are expected to - * remove suggestions using {@link #removeNetworkSuggestions(List)} and then add the modified - * suggestion back using this API.
  • + *
  • In-place modification of existing suggestions are allowed. + * If the provided suggestions {@link WifiNetworkSuggestion#equals(Object)} any previously + * provided suggestions by the app. Previous suggestions will be updated
  • * * @param networkSuggestions List of network suggestions provided by the app. * @return Status code for the operation. One of the STATUS_NETWORK_SUGGESTIONS_ values. - * {@link WifiNetworkSuggestion#equals(Object)} any previously provided suggestions by the app. * @throws {@link SecurityException} if the caller is missing required permissions. */ @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)