diff options
| -rw-r--r-- | api/system-current.txt | 1 | ||||
| -rw-r--r-- | wifi/java/android/net/wifi/WifiManager.java | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 1c8967281cb0..9e60ba9e2ff5 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -26682,6 +26682,7 @@ package android.net.wifi { method public boolean reconnect(); method public boolean removeNetwork(int); method public boolean saveConfiguration(); + method public boolean setMetered(int, boolean); 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/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 2ad3c2e16e21..d45ba03488f9 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -892,6 +892,24 @@ public class WifiManager { } /** + * Sets whether or not the given network is metered from a network policy + * point of view. A network should be classified as metered when the user is + * sensitive to heavy data usage on that connection due to monetary costs, + * data limitations or battery/performance issues. A typical example would + * be a wifi connection where the user was being charged for usage. + * @param netId the integer that identifies the network configuration + * to the supplicant. + * @param isMetered True to mark the network as metered. + * @return {@code true} if the operation succeeded. + * @hide + */ + @SystemApi + public boolean setMetered(int netId, boolean isMetered) { + // TODO(jjoslin): Implement + return false; + } + + /** * Remove the specified network from the list of configured networks. * This may result in the asynchronous delivery of state change * events. |