From cd42acd9515bdce89d4f1401ee2888d684bf1918 Mon Sep 17 00:00:00 2001 From: Antonio Cansado Date: Wed, 17 Feb 2016 13:03:38 -0800 Subject: Implementation of data usage callbacks. NetworkStatsService will register data usage requests and keep data usage stats scoped to the request. There are different types of data usage requests - scoped to a set of NetworkTemplate; these are restrictred to device owners and carrier apps and allow the caller to monitor all activity on the specified interfaces. - scoped to all uids visible to the user, if the user has android.Manifest.permission#PACKAGE_USAGE_STATS permission. The set of uids may change over time, so we keep track of that. - scoped to a set of uids given by the caller, granted that the caller has access to those uids. - scoped to the caller's own data usage. This doesn't require PACKAGE_USAGE_STATS. Bug: 25812785 Change-Id: Ie11f35fc1f29d0dbe82f7fc924b169bb55c76708 --- core/java/android/net/DataUsageRequest.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/java/android/net/DataUsageRequest.java') diff --git a/core/java/android/net/DataUsageRequest.java b/core/java/android/net/DataUsageRequest.java index 0e46f4c0cbdf..5e96cc1fe04a 100644 --- a/core/java/android/net/DataUsageRequest.java +++ b/core/java/android/net/DataUsageRequest.java @@ -31,6 +31,11 @@ import java.util.Objects; */ public class DataUsageRequest implements Parcelable { + /** + * @hide + */ + public static final String PARCELABLE_KEY = "DataUsageRequest"; + /** * @hide */ -- cgit v1.2.3