1f7e05eda687279ac9deb894f42ac927bd471ad2 |
|
10-Mar-2016 |
Jeff Davidson <jpd@google.com> |
NetworkStats.Bucket API polish. -Add @IntDef constants for STATE_ and ROAMING_. -Expand docs for ROAMING_ constants. -Use ROAMING_NO/YES instead of ROAMING_DEFAULT/ROAMING. Bug: 27531260 Change-Id: I54ecfb4148caa549214df0bee9983036ffa4cb55
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
cd42acd9515bdce89d4f1401ee2888d684bf1918 |
|
17-Feb-2016 |
Antonio Cansado <acansado@google.com> |
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
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
a6a78076eeb27084ed815ce0492d4ffe08134bec |
|
12-Jan-2016 |
Jeff Davidson <jpd@google.com> |
Implement roaming tracking in NetworkStats summary queries. Whether a network is deemed roaming or not was already being tracked as part of the NetworkIdentitySet, so the underlying data store already tracks roaming and native data separately. However, this data was being aggregated together in NetworkStatsCollection#getSummary, since the NetworkIdentitySet is converted to an iface name for the purposes of matching, and the iface name will be identical whether or not the iface is considered roaming. Now it is separated. Also fixes a long-standing bug in NetworkIdentitySet where an identity read from a saved file would always be considered roaming == false, even if it wasn't at the time it was written. Bug: 25813438 Change-Id: I11ab5b51182ed8da7af8fde468df065f9fdc3dad
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
1efb1335814aea8ee0696144ca0ab24159b86e54 |
|
10-Dec-2015 |
Jeff Davidson <jpd@google.com> |
Relax permissions around NetworkStatsManager APIs. Currently, access to network usage history and statistics requires a signature|privileged permission, an AppOps bit (associated with the PACKAGE_USAGE_STATS permission), or device/profile ownership. Once access is granted via one of these mechanisms, it generally applies to any UID running in the same user as the caller. This CL expands access as follows: -Any app can access its own usage history with no extra requirements. -Carrier-privileged applications can access usage history for the entire device. -Device owners can access per-UID breakdowns for usage. Previously they could access the summary for the whole device, but not the individual breakdowns. We simplify the permission model by defining three access levels - DEFAULT (own app only), USER (all apps in the same user), and DEVICE (all apps on the device), and propagate these levels throughout. Finally, this CL fixes an apparent bug in NetworkStatsSerice#hasAppOpsPermissions - if the AppOp bit was in MODE_DEFAULT, hasAppOpsPermission would always return false instead of falling back to the PackageManager permission check. Bug: 25812859 Bug: 25813856 Change-Id: Ic96e0776e2a4215a400163872acea1ededfaced9
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
9aa7258a172bda6ef0e08c5617c06bf32818f7a4 |
|
31-Mar-2015 |
Zoltan Szatmary-Ban <szatmz@google.com> |
Data usage API: any uid is accessible to system apps running in any user This CL mostly affects Settings app as it can run in a user different than UserHandle.OWNER. Since it is a system app it should have access to all uid's data usage, regardless of which user it is currently running in. Bug: 19967498 Change-Id: I4a7787134d998457f7e2a1029183d44d9584083e
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
98170b0db191f916bf2a0f104f5d5057c2aaeaa9 |
|
18-Mar-2015 |
Wenchao Tong <tongwenchao@google.com> |
Keep debug information in NetworkStats files Create two special SETs. SET_DBG_VPN_IN is used by individual applications to know how much traffic of the NetworkIdentity was actually moved from a VPN app. SET_DBG_VPN_OUT is used by the VPN app to know how much traffic of the NetworkIdentity was deducted. A debug application can restore the raw stats by these entries. raw_traffic = recorded_entry (TAG_NONE, SET_ALL) + recorded_entry (TAG_NONE, SET_DBF_VPN_OUT) - recorded_entry (TAG_NONE, SET_DBF_VPN_IN) The two debug SETs are not returned by NetworkStatsService.openSession(). These debug entries are retrieved by NetworkStatsCollection.dump(). Bug: 19536273 Change-Id: I03ef9f7667f5f2f48cbe3f6b11447fe7ead8ad3b
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
9c5dfa5c79fff17f96bf977b86c0c9ceb8c3cf9b |
|
23-Feb-2015 |
Zoltan Szatmary-Ban <szatmz@google.com> |
Data Usage public API Added new API consisting of android.app.usage.NetworkUsageManager and android.app.usage.NetworkUsageStats. Through them data usage on a network interface can be programmatically queried. Both summary and details are available. Bug: 19208876 Change-Id: I0e0c4b37ae23ad1e589d4b0c955b93f28ba4333e
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac |
|
28-Feb-2015 |
John Spurlock <jspurlock@google.com> |
Remove unused imports in frameworks/base. Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
55a442e58262e253df965d652bd8219c8d1e72d3 |
|
19-Nov-2014 |
Jeff Sharkey <jsharkey@android.com> |
Lightweight checkin output for network stats. Define and print a compact version of network statistics when dump is requested with the "--checkin" flag. Defaults to last 24 hours, but included data can be tweaked with various flags. Groups together detailed network identities into larger umbrella terms like "mobile" and "wifi." Bug: 18415963 Change-Id: I70cf9c828ea5c6e5bb6884837d3608f66fbad2e6
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|
9158825f9c41869689d6b1786d7c7aa8bdd524ce |
|
22-Nov-2013 |
Amith Yamasani <yamasani@google.com> |
Move some system services to separate directories Refactored the directory structure so that services can be optionally excluded. This is step 1. Will be followed by another change that makes it possible to remove services from the build. Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/net/NetworkStatsCollection.java
|