diff options
author | d34d <clark@cyngn.com> | 2016-01-29 11:44:41 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-02-02 08:30:46 -0800 |
commit | 52e4b23e34348eb78e832a46c4f9fea67a1e3bf9 (patch) | |
tree | d7b6843d4f2b7e4ab36995f217d1545233b5915b /wifi | |
parent | 19960ebe82e950b2e1bd46d421fe3aa0dee4bfab (diff) | |
download | frameworks_base-52e4b23e34348eb78e832a46c4f9fea67a1e3bf9.zip frameworks_base-52e4b23e34348eb78e832a46c4f9fea67a1e3bf9.tar.gz frameworks_base-52e4b23e34348eb78e832a46c4f9fea67a1e3bf9.tar.bz2 |
Tethering: Turn off Wi-Fi Hotspot after inactivity (1/3)
Turn off the Wi-Fi hotspot after a specified time of inactivity.
The hotspot is considered to be inactive when no clients are
connected to it.
Change-Id: Ife48d5254b06b4e80841d5970984ab9979574e07
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 9d4f6e2..35d6d9e 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -456,6 +456,13 @@ public class WifiConfiguration implements Parcelable { */ public int userApproved = USER_UNSPECIFIED; + /** + * @hide + * Inactivity time before wifi tethering is disabled. Here inactivity means no clients + * connected. A value of 0 means the AP will not be disabled when there is no activity + */ + public long wifiApInactivityTimeout; + /** The Below RSSI thresholds are used to configure AutoJoin * - GOOD/LOW/BAD thresholds are used so as to calculate link score * - UNWANTED_SOFT are used by the blacklisting logic so as to handle @@ -1556,6 +1563,7 @@ public class WifiConfiguration implements Parcelable { creationTime = source.creationTime; updateTime = source.updateTime; SIMNum = source.SIMNum; + wifiApInactivityTimeout = source.wifiApInactivityTimeout; } } @@ -1638,6 +1646,7 @@ public class WifiConfiguration implements Parcelable { dest.writeInt(numNoInternetAccessReports); dest.writeInt(noInternetAccessExpected ? 1 : 0); dest.writeInt(SIMNum); + dest.writeLong(wifiApInactivityTimeout); } /** Implement the Parcelable interface {@hide} */ @@ -1717,6 +1726,7 @@ public class WifiConfiguration implements Parcelable { config.numNoInternetAccessReports = in.readInt(); config.noInternetAccessExpected = in.readInt() != 0; config.SIMNum = in.readInt(); + config.wifiApInactivityTimeout = in.readLong(); return config; } |