History log of /frameworks/base/services/tests/servicestests/src/com/android/server/net/NetworkStatsCollectionTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
66a6be3a4c955e52ea61e0d35f338983f632abf8 30-Mar-2016 Jack Yu <jackyu@google.com> Excluded certain APNs (e.g. IMS) from mobile data usage.

Added not_metered capability to a mobile network if none
of its associated APN types are metered. Also used not_metered
capability to determine if a network should be accounted for
data usage or not instead of using network type, which is
always MOBILE after refactoring. Will add VT usage support
in next phase.

bug: 20888836
Change-Id: Id692cb856be9a47d0e918371112630128965b1bb
/frameworks/base/services/tests/servicestests/src/com/android/server/net/NetworkStatsCollectionTest.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/tests/servicestests/src/com/android/server/net/NetworkStatsCollectionTest.java
70c70530bd6793869736ec894498e4ebf5dc9b20 16-May-2012 Jeff Sharkey <jsharkey@android.com> Transition from DEV network stats to XT.

When XT stats are available, transition to prefer them over DEV,
since they aren't subject to hardware driver bugs. Only switches at
the first atomic XT bucket, and adds a Settings.Secure flag to force
back to DEV if needed. Includes tests to cover transition.

Fix tests where device overlay would change which network types
reflected data usage. Test both history and summary APIs. Fixed
collection timestamps to reflect full buckets.

Bug: 6504744
Change-Id: Idd7f3b2fdb064c36547c85c51c214fd938c59b7e
/frameworks/base/services/tests/servicestests/src/com/android/server/net/NetworkStatsCollectionTest.java
0cf6de0c930c9082b7bffdb9824e4a7c7832b6df 05-May-2012 Jeff Sharkey <jsharkey@android.com> Fix network stats and policy tests.

Bug: 6299195
Change-Id: I1941b5f7329940cc7469bd3fda17c3dc3a656250
/frameworks/base/services/tests/servicestests/src/com/android/server/net/NetworkStatsCollectionTest.java
8fc27e8b87bd1def854a03d84009143b315d4176 05-Apr-2012 Jeff Sharkey <jsharkey@android.com> Support metered Wi-Fi NetworkPolicy.

Add networkId field to NetworkIdentity to identify Wi-Fi networks by
SSID. Add support for policies without usage cycles.

Only apply mobile policies when SIM state is ready, which is cleaner
than just checking for airplane mode. Also avoids creating no-op
default policies when subscriberId is null.

Bug: 3001465, 3291052
Change-Id: I1f8aaa49a5db306df022c402ea7f3f5d4bc0cfc7
/frameworks/base/services/tests/servicestests/src/com/android/server/net/NetworkStatsCollectionTest.java
63abc37356728c0575d6a62a203102ae6d97953b 12-Jan-2012 Jeff Sharkey <jsharkey@android.com> Move network stats to FileRotator pattern.

Split existing network stats into two separate classes: a recorder
which generates historical data based on periodic counter snapshots,
and a collection of historical data with persistance logic.

Recorder keeps a pending history in memory until outstanding data
crosses a specific threshold. Persisting is handled through a given
FileRotator. This pattern significantly reduces disk churn and
memory overhead. Separate UID data from UID tag data, enabling a
shorter rotation cycle. Migrate existing stats into new structure.

Remove "xt" stats until iptables hooks are ready. Avoid consuming
Entry values when recording into NetworkStatsHistory. Assign
operation counts to default route interface.

Introduce "Rewriter" interface in FileRotator with methods to enable
rewriteAll(). Introduce IndentingPrintWriter to handle indenting in
dump() methods.

Bug: 5386531
Change-Id: Ibe086230a17999a197206ca62d45f266225fdff1
/frameworks/base/services/tests/servicestests/src/com/android/server/net/NetworkStatsCollectionTest.java