From 9f65210780d89a39245c01a2c52447512fbdd950 Mon Sep 17 00:00:00 2001 From: Amin Shaikh Date: Fri, 20 Jan 2017 11:05:13 -0800 Subject: [PATCH] Expose WifiConfiguration#ephemeral is a SystemApi Bug: 34503179 Test: make Change-Id: I3a89b89da67152bb522ae4dbfd1cfe1b4830d8ae --- api/system-current.txt | 1 + wifi/java/android/net/wifi/WifiConfiguration.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index 3bc7be541497a..d9b2a3cb804ee 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -27471,6 +27471,7 @@ package android.net.wifi { method public int describeContents(); method public android.net.ProxyInfo getHttpProxy(); method public boolean hasNoInternetAccess(); + method public boolean isEphemeral(); method public boolean isNoInternetAccessExpected(); method public boolean isPasspoint(); method public void setHttpProxy(android.net.ProxyInfo); diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 3a4567112704e..8cf7a24efb0ad 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -707,6 +707,16 @@ public class WifiConfiguration implements Parcelable { */ public boolean ephemeral; + /** + * @hide + * Indicate that a WifiConfiguration is temporary and should not be saved + * nor considered by AutoJoin. + */ + @SystemApi + public boolean isEphemeral() { + return ephemeral; + } + /** * @hide * A hint about whether or not the network represented by this WifiConfiguration