summaryrefslogtreecommitdiff
path: root/core/java/android/net/DataUsageRequest.java
Commit message (Collapse)AuthorAgeFilesLines
* [MS08] Move NetworkStats files to f/b/package/ConnectivityTJunyu Lai2021-12-101-112/+0
| | | | | | | | | | | NetworkStatsService is going to be moved into ConnectivityService module. Move all related files to packages/ConnectivityT so that it can be easily migrate these files to connectivity module after clearing the hidden API usages. Bug: 197717846 Test: TH Change-Id: Iead00832b5eb7b1dc40a92027c5a14ae8316b16c
* Add @Nullable to Object#equals()Roman Kalukiewicz2021-02-051-1/+2
| | | | | | | | | | | | This is a partial cherry-pick of change: I5eedb571c9d78862115dfdc5dae1cf2a35343580 for connectivity classes. Bug: 170883422 Test: m Merged-In: I5eedb571c9d78862115dfdc5dae1cf2a35343580 Change-Id: I7dc661863b73f4198ddb4f3a1566583d0f07db3c
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Addressing API council comments on NetworkStatsManager.Antonio Cansado2016-05-101-50/+13
| | | | | | | | | | | | | | | | | | | Callbacks - DataUsageCallback renamed to UsageCallback - DataUsagePolicy removed; passing in params directly to register method - making it an abstract class - passing in (networkType, subscriberId) that reached its threshold - renaming onLimitReached to onThresholdReached to match existing naming - only monitor single network,subscriberId - no monitoring of specific uids; using device or user wide instead Tags - only owner uid can read its tags - exposing only TAG_NONE to match service side BUG: 27530098 Change-Id: I2b2664da71806868a1e937d2bf4d1f234637509b
* Parcelable classes should always be final.Jeff Sharkey2016-02-291-1/+1
| | | | | | | Also hide ConnectivityMetricsEvent which isn't being used yet. Bug: 27415331 Change-Id: Iacdccddda504f3f669185f807b4f35b8dc2b0212
* Implementation of data usage callbacks.Antonio Cansado2016-02-171-0/+5
| | | | | | | | | | | | | | | | | | | | 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
* Adding a callback to notify data usage.Antonio Cansado2016-02-021-0/+143
Allow holders of android.Manifest.permission#PACKAGE_USAGE_STATS to be notified when data usage has exceeded a given threshold. This allows an app to update its data usage metrics without polling. Bug: 25812785 Change-Id: I3a4904a97f3c7fbaf8071b460f9ee6ca9c1ba4ed