diff options
author | Jeff Sharkey <jsharkey@android.com> | 2011-09-18 16:17:39 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-09-18 16:17:39 -0700 |
commit | ff2aff2ac18daa758e5d51a4fd58976ce5f66d46 (patch) | |
tree | e56c91ca8d719db7fa301f3656c41750babd6677 /core/java/android/net | |
parent | d413eb3861aae87386d418e9af4875f6f330cd05 (diff) | |
parent | 3d1d57dcdb02ace6af5810bd4ec3f8fad5fc1799 (diff) | |
download | frameworks_base-ff2aff2ac18daa758e5d51a4fd58976ce5f66d46.zip frameworks_base-ff2aff2ac18daa758e5d51a4fd58976ce5f66d46.tar.gz frameworks_base-ff2aff2ac18daa758e5d51a4fd58976ce5f66d46.tar.bz2 |
am 3d1d57dc: Merge "Collect and persist tethering stats." into ics-factoryrom
* commit '3d1d57dcdb02ace6af5810bd4ec3f8fad5fc1799':
Collect and persist tethering stats.
Diffstat (limited to 'core/java/android/net')
-rw-r--r-- | core/java/android/net/IConnectivityManager.aidl | 6 | ||||
-rw-r--r-- | core/java/android/net/TrafficStats.java | 18 |
2 files changed, 21 insertions, 3 deletions
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl index eef658e..7046008 100644 --- a/core/java/android/net/IConnectivityManager.aidl +++ b/core/java/android/net/IConnectivityManager.aidl @@ -83,6 +83,12 @@ interface IConnectivityManager String[] getTetheredIfaces(); + /** + * Return list of interface pairs that are actively tethered. Even indexes are + * remote interface, and odd indexes are corresponding local interfaces. + */ + String[] getTetheredIfacePairs(); + String[] getTetheringErroredIfaces(); String[] getTetherableUsbRegexs(); diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java index 47cfa73..18eb9f6 100644 --- a/core/java/android/net/TrafficStats.java +++ b/core/java/android/net/TrafficStats.java @@ -53,25 +53,33 @@ public class TrafficStats { public static final int UID_REMOVED = -4; /** + * Special UID value used when collecting {@link NetworkStatsHistory} for + * tethering traffic. + * + * @hide + */ + public static final int UID_TETHERING = -5; + + /** * Default tag value for {@link DownloadManager} traffic. * * @hide */ - public static final int TAG_SYSTEM_DOWNLOAD = 0xFFFF0001; + public static final int TAG_SYSTEM_DOWNLOAD = 0xFFFFFF01; /** * Default tag value for {@link MediaPlayer} traffic. * * @hide */ - public static final int TAG_SYSTEM_MEDIA = 0xFFFF0002; + public static final int TAG_SYSTEM_MEDIA = 0xFFFFFF02; /** * Default tag value for {@link BackupManager} traffic. * * @hide */ - public static final int TAG_SYSTEM_BACKUP = 0xFFFF0003; + public static final int TAG_SYSTEM_BACKUP = 0xFFFFFF03; /** * Snapshot of {@link NetworkStats} when the currently active profiling @@ -90,6 +98,10 @@ public class TrafficStats { * <p> * Changes only take effect during subsequent calls to * {@link #tagSocket(Socket)}. + * <p> + * Tags between {@code 0xFFFFFF00} and {@code 0xFFFFFFFF} are reserved and + * used internally by system services like {@link DownloadManager} when + * performing traffic on behalf of an application. */ public static void setThreadStatsTag(int tag) { NetworkManagementSocketTagger.setThreadSocketStatsTag(tag); |