diff options
| author | Ashish Sharma <ashishsharma@google.com> | 2012-08-10 16:04:07 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-10 16:04:07 -0700 |
| commit | 77b257967de44e031c313858a45fccdd6e89732f (patch) | |
| tree | c55367092b00153f6e0a7e8079da5bdba8b90e91 /core/java | |
| parent | 6cc7a9276bdad8b230e35141204c949291350f0b (diff) | |
| parent | 0412423f06ec633203b96f68b51f0720c33a2473 (diff) | |
| download | frameworks_base-77b257967de44e031c313858a45fccdd6e89732f.zip frameworks_base-77b257967de44e031c313858a45fccdd6e89732f.tar.gz frameworks_base-77b257967de44e031c313858a45fccdd6e89732f.tar.bz2 | |
Merge "Setup idletimer for network interface." into jb-mr1-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/INetworkManagementService.aidl | 21 | ||||
| -rw-r--r-- | core/java/android/provider/Settings.java | 23 |
2 files changed, 44 insertions, 0 deletions
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl index 53bb88a..20d3ec3 100644 --- a/core/java/android/os/INetworkManagementService.aidl +++ b/core/java/android/os/INetworkManagementService.aidl @@ -323,6 +323,27 @@ interface INetworkManagementService int getInterfaceTxThrottle(String iface); /** + * Sets idletimer for an interface. + * + * This either initializes a new idletimer or increases its + * reference-counting if an idletimer already exists for given + * {@code iface}. + * + * {@code label} usually represents the network type of {@code iface}. + * Caller should ensure that {@code label} for an {@code iface} remains the + * same for all calls to addIdleTimer. + * + * Every {@code addIdleTimer} should be paired with a + * {@link removeIdleTimer} to cleanup when the network disconnects. + */ + void addIdleTimer(String iface, int timeout, String label); + + /** + * Removes idletimer for an interface. + */ + void removeIdleTimer(String iface); + + /** * Sets the name of the default interface in the DNS resolver. */ void setDefaultInterfaceForDns(String iface); diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 9ec4744..01252f0 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2852,6 +2852,29 @@ public final class Settings { */ public static final String TETHER_DUN_APN = "tether_dun_apn"; + /** Inactivity timeout to track mobile data activity. + * + * If set to a positive integer, it indicates the inactivity timeout value in seconds to + * infer the data activity of mobile network. After a period of no activity on mobile + * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE} + * intent is fired to indicate a transition of network status from "active" to "idle". Any + * subsequent activity on mobile networks triggers the firing of {@code + * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active". + * + * Network activity refers to transmitting or receiving data on the network interfaces. + * + * Tracking is disabled if set to zero or negative value. + * + * @hide + */ + public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile"; + + /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE} + * but for Wifi network. + * @hide + */ + public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi"; + /** * No longer supported. */ |
