From 9ef9bfdaff6a147733dee18d1333cf844446b653 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Fri, 3 Feb 2017 12:51:40 -0800 Subject: [PATCH] WifiManager: API upates for O Deprecate the following API's: 1. pingSupplicant() - We don't want apps trying to figure out if wpa_supplicant is running or not. It should not be something that apps need to know. 2. saveConfiguration() - No longer needed, we automatically persist data when needed. Other changes: 1. Reworded the docstrings to remove direct reference to wpa_supplicant for network configuration related API's. 2. We no longer allow apps to modfiy network configuration of other apps. Added a docstring explaining that in the 3 modify API's. 3. Changed the wording of enableNetwork's |disableOthers| flag. Bug: 31146757 Test: make update-api Change-Id: If970d85146de3532072191cb2b7ecb0d5adb2774 --- api/current.txt | 4 +- api/system-current.txt | 4 +- api/test-current.txt | 4 +- wifi/java/android/net/wifi/WifiManager.java | 72 ++++++++++++--------- 4 files changed, 49 insertions(+), 35 deletions(-) diff --git a/api/current.txt b/api/current.txt index 9b3798c4af702..d1daef2074da2 100644 --- a/api/current.txt +++ b/api/current.txt @@ -25762,13 +25762,13 @@ package android.net.wifi { method public boolean isScanAlwaysAvailable(); method public boolean isTdlsSupported(); method public boolean isWifiEnabled(); - method public boolean pingSupplicant(); + method public deprecated boolean pingSupplicant(); method public void queryPasspointIcon(long, java.lang.String); method public boolean reassociate(); method public boolean reconnect(); method public boolean removeNetwork(int); method public boolean removePasspointConfiguration(java.lang.String); - method public boolean saveConfiguration(); + method public deprecated boolean saveConfiguration(); method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiEnabled(boolean); diff --git a/api/system-current.txt b/api/system-current.txt index 7af7c4d585fde..92447bb41c28e 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -28289,13 +28289,13 @@ package android.net.wifi { method public boolean isWifiApEnabled(); method public boolean isWifiEnabled(); method public boolean isWifiScannerSupported(); - method public boolean pingSupplicant(); + method public deprecated boolean pingSupplicant(); method public void queryPasspointIcon(long, java.lang.String); method public boolean reassociate(); method public boolean reconnect(); method public boolean removeNetwork(int); method public boolean removePasspointConfiguration(java.lang.String); - method public boolean saveConfiguration(); + method public deprecated boolean saveConfiguration(); method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration); diff --git a/api/test-current.txt b/api/test-current.txt index 85a891d74fd20..db17900e3456f 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -25854,13 +25854,13 @@ package android.net.wifi { method public boolean isScanAlwaysAvailable(); method public boolean isTdlsSupported(); method public boolean isWifiEnabled(); - method public boolean pingSupplicant(); + method public deprecated boolean pingSupplicant(); method public void queryPasspointIcon(long, java.lang.String); method public boolean reassociate(); method public boolean reconnect(); method public boolean removeNetwork(int); method public boolean removePasspointConfiguration(java.lang.String); - method public boolean saveConfiguration(); + method public deprecated boolean saveConfiguration(); method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiEnabled(boolean); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 3fb8ef3e2de30..ed6a166d3fc66 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -838,7 +838,8 @@ public class WifiManager { } /** - * Return a list of all the networks configured in the supplicant. + * Return a list of all the networks configured for the current foreground + * user. * Not all fields of WifiConfiguration are returned. Only the following * fields are filled in: *