c506ff615080082515b1f634ad49b19fd2111669 |
|
17-Nov-2011 |
Jeff Sharkey <jsharkey@android.com> |
Only write network stats when already loaded. Bug: 5584564 Change-Id: Ife2a68804bf3691e9bccdc167807204bce8a85b2
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
7ee8658453fe4efe04781bea9a14368e1d5ff41f |
|
15-Nov-2011 |
Jeff Sharkey <jsharkey@android.com> |
Conservatively trim data usage stats. Instead of trusting NTP time alone, use the most-conservative of system clock and NTP. Bug: 5584564 Change-Id: I5dd87fc009959b1cf0a7d660e385a0b1a8be238b
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
163e6443f27884a9bfcb9a48ef606dc635852c23 |
|
01-Nov-2011 |
Jeff Sharkey <jsharkey@android.com> |
Correct proc file reader, optimizations. Moved away from BufferedReader, which only reads the first 8KB of some proc files because it aggresively fills its buffer. Optimized proc parsing, now double the speed. Tests to cover. Log when NetworkStats counters roll backwards when subtracting, and optimizations around findIndex(). When system removes UID, also remove from last stats snapshot to avoid xt counters from rolling backwards. Bug: 5472949, 5458380 Change-Id: I07c08fe5233156fac2b84450f6291868bf9bfaf2
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
961e30458319cfd50e1892ba7dd14a1d0ebe4cc7 |
|
30-Aug-2011 |
Jeff Sharkey <jsharkey@android.com> |
Introduce immediate CONNECTIVITY_ACTION variant. New broadcast that is dispatched immediately after connectivity changes have been handled by ConnectivityService, bypassing any applicable CONNECTIVITY_CHANGE_DELAY. Also protect CONNECTIVITY_CHANGE broadcasts, since they should only be sent by system. Bug: 5198167 Change-Id: I75f1fb44b21da1879f0ab960bcaa481126d70fde
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
8e28b7d78232f6cf08739ca0d129cc7f9e650801 |
|
19-Aug-2011 |
Jeff Sharkey <jsharkey@android.com> |
Proactively disable data when over policy limit. Add policy controls to NetworkStateTracker which are combined with other user preference and internal flags to decide if data connection should be established. Better locking around enabled flags. When data network would be over limit, proactively disable data on that network. Enable when policy is snoozed or when cycle resets. Track and dismiss notifications from now-stale policies. Bug: 4587023, 5178147 Change-Id: Ibfcc9f73cda7c369209af701b46eddd3d1943f2d
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
b5d55e302d2253e4bfb233ea705caf258cdc4cb9 |
|
11-Aug-2011 |
Jeff Sharkey <jsharkey@android.com> |
Foreground/background network stats using sets. Teach NetworkStats about "counter sets" coming from kernel, and use them to track usage in foreground/background. Add AID_NET_BW_ACCT to system_server so it can control counter sets. Move to composite key of NetworkIdentitySet, UID, set, and tag when recording historical usage. Persisting still clusters by identity, since that is heaviest object. Request async stats poll during systemReady() to bootstrap later delta calculations. Reset kernel counters when UID removed. Update various tests. Bug: 5105592, 5146067 Change-Id: Idabec9e3ffcaf212879821515602ecde0a03de8c
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
af82ea2abf53b6825fbbce23434419527d8e8b5c |
|
05-Aug-2011 |
Jeff Sharkey <jsharkey@android.com> |
Data cycle ends on last second of month. When data cycle resets on a day invalid in given month, snap the cycle to last second of month. Previous behavior was to bump fully into next month, but that causes cycle loops. Includes tests to verify. Bug: 4623124 Change-Id: I2f233091f6f1df33a2814284519cbc04532874e9
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
a63ba59260cd1bb3f5c16e395ace45a61f1d4461 |
|
20-Jul-2011 |
Jeff Sharkey <jsharkey@android.com> |
Add operation counts to network statistics. Provide API to increment "operation counts" for a UID and tag, used to eventually derive bytes/operation stats. Internally is stored at network layer, but should belong at data layer. Switch profiling to use data layer stats, which are emulated by summarizing network layer details. Read packet counts from new /proc/ columns and collect them into NetworkStatsHistory. Prevent double-counting by ignoring values from first snapshot. Watch for duplicate /proc/ entries. Update tests to verify packet and operation counters. Bug: 5052136, 5097392 Change-Id: I1832f65a2b8a9188f8088f253474a667c21a2f09
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
41ff7ec82422a5b6d00892afdb3232bc0e53d851 |
|
26-Jul-2011 |
Jeff Sharkey <jsharkey@android.com> |
Revise data limit notifs, watch kernel alerts. Teach NetworkPolicy limits to "snooze" when requested by user, and notify with both dialog and notification. Register for network alerts through NMS to trigger updates immediately instead of waiting for next stats update. Enforce that all NetworkPolicy are unique on a template basis, and move SCREEN_ON/OFF broadcasts to background thread. Launch SystemUI and Settings directly instead of using actions, and include full NetworkTemplate in extras. Tests to verify notification and snooze behavior. Bug: 5057979, 5023579, 4723336, 5045721 Change-Id: I03724beff94a7c0547cb5220431ba8d4cd44d077
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
4e814c348ce205fcc1a273427f95ef1d100ed60c |
|
15-Jul-2011 |
Jeff Sharkey <jsharkey@android.com> |
Hide NetworkTemplate details, buffered stats I/O. Move template matching to builder methods instead of exposing the internal constants. Also rule to match Ethernet usage. Buffer reading and writing of network stats, making operations 5x faster. Change-Id: Iedb2d0ab3b26a976811c050f84a164e909eb74b6
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
d37948f6ed1667d077e0e3a38808f42f981ddcc2 |
|
12-Jul-2011 |
Jeff Sharkey <jsharkey@android.com> |
Hide NetworkStatsHistory internals. Instead of exposing internal storage details, offer getValues() accessor which populates values into a recycled structure. Change-Id: I5228d7099a8f61b2018a435a813435a67dae49b4
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
b3f19ca36c8c1301893c621d8f2150e06210722c |
|
30-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Enforce background data flag, rules through netd. Connect up netd penalty box through NMS, and enforce the existing background data flag by putting all UIDs in penalty box. Allow platform applications to have policy applied. Only dispatch unique rules to netd, avoiding any repeats. Bug: 4598463, 4965677 Change-Id: Ibf9beff998ba7a1ea92f5e2f7eeba7b483d4b918
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
50fd36d7c38c40b087c8f3e3172478abe0c051d9 |
|
16-Jun-2011 |
Ashish Sharma <ashishsharma@google.com> |
Push interface quota rules from NetworkPolicyManager to kernel. Change-Id: Id2b758f561820b44839f69bf5fbd676cae771fe3
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
4414cea13908b8230640f84ef39603d68ff9c377 |
|
25-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Better network stats parsing, integer tags, async. Change NMS parsing to handle extended /proc/ stats formats by pairing values with header keys. Move TrafficStats to integer tags to match kernel internals, and offer well-known tags for system services. Async policy event dispatch from NPMS, and update tests to block for event dispatch. Narrow app policy to exclude apps signed with system key, which are usually critical. Bug: 4948913, 4903489, 4585280 Change-Id: Idb357227ccaa617906411f309371cea18d7bc519
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
b09540f33a6cabe50edec0ef32d0b1d0b0d96fff |
|
19-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Handle removed UIDs in network stats and policy. When UID_REMOVED, clean up any existing UID network policy so it doesn't linger for future apps. Also move any NetworkStatsHistory to special UID_REMOVED tracking bucket. Tests for new removal code. Also test detailed UID stats, including network changes to verify template matching logic. Bug: 4584212 Change-Id: I9faadf6b6f3830eb45d86c7f1980a27cdbcdb11e
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
1b5a2a96f793211bfbd39aa29cc41031dfa23950 |
|
19-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Read "qtaguid" network stats, refactor templates. Teach NMS to read qtaguid stats from kernel, but fall back to older stats when kernel doesn't support. Add "tags" to NetworkStats entries to support qtaguid. To work around double-reporting bug, subtract tagged stats from TAG_NONE entry. Flesh out stronger NetworkTemplate. All NetworkStatsService requests now require a template, and moved matching logic into template. Record UID stats keyed on complete NetworkIdentitySet definition, similar to how interface stats are stored. Since previous UID stats didn't have iface breakdown, discard during file format upgrade. Change-Id: I0447b5e7d205d73d28e71c889c568e536e91b8e4
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
fdfef57f498e3021a34342538aef9f1c7ccbae78 |
|
17-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Notify policy listeners about metered ifaces. Currently, kernel definition of metered networks is applied at the interface level. This change maintain list of those metered ifaces and notifies policy listeners, like ConnectivityService. (This gives us a consistent picture of when a network would be blocked.) Bug: 4601393 Change-Id: I277d5ca96ab967a1c1c3f1da8f9587557cd6d74c
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
2ef2aeb18d9d1ca7e25ad705c4da559f3682805a |
|
15-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Fix NetworkPolicy tests after notifications. Change-Id: I569e9ceba6d89459b347ed151fd9bda2909dc892
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
af11d4859582a9736aa204562f0beac5a7d60934 |
|
13-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Fix test-related build breakage. Change-Id: I48a3dbbdc49d742d6ad19cff34ee8da4b3949bb8
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
4a97122ebf4d92a3f94402041729d77905e6c0c0 |
|
12-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Growable NetworkStats object instead of builder. NetworkStats now grows in place with arraycopy() instead of callers needing to know record count a priori. Better growth calculation for both NetworkStats and NetworkStatsHistory; 50% each time. Better estimates of buckets needed in calling services. Change-Id: I3adbffa0b7407612cc6349d9135a8b4eb63cd440
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
cd2ca4038a027315832c38c68be5076000bc4b53 |
|
11-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Move data cycle methods to framework object. Moved so they can be used by both system service and Settings UI, since they both work with data usage cycles. Still covered by tests. Change-Id: I01c0c4db6da9457dd867c9167d31a5f9f8e5f5d9
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
21c9c45e5caf62b935354b74392fb40c4bf18529 |
|
07-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Interface-level network policy, persist policies. Define NetworkPolicy as cycle-reset day and warning/limit values, and set/get through NetworkPolicyManager. Watch ConnectivityManager for network connection events, and apply quota rules based on matching interfaces. Policy service matches based on strong identity to support IMSI-specific policy values. Calculates remaining quota based on current stats recorded since the last reset cycle day. Tests to verify edge cases around February. Persist network and UID policies in XML, and restore on boot. Change-Id: Id40ba7d6eed6094fbd5e18e6331286c606880d80
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
75279904202357565cf5a1cb11148d01f42b4569 |
|
25-May-2011 |
Jeff Sharkey <jsharkey@android.com> |
Collect historical network stats. Periodically records delta network traffic into historical buckets to support other services, such NetworkPolicyManager and Settings UI. Introduces NetworkStatsHistory structure which contains sparse, uniform buckets of data usage defined by timestamps. Service periodically polls NetworkStats and records changes into buckets. It only persists to disk when substantial changes have occured. Current parameters create 4 buckets each day, and persist for 90 days, resulting in about 8kB of data per network. Only records stats for "well known" network interfaces that have been claimed by Telephony or Wi-Fi subsystems. Historical stats are also keyed off identity (such as IMSI) to support SIM swapping. Change-Id: Ia27d1289556a2bf9545fbc4f3b789425a01be53a
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|
9599cc5f21152860af9d18015b1398b50743da76 |
|
22-May-2011 |
Jeff Sharkey <jsharkey@android.com> |
Tests for NetworkPolicyManager rule generation. Verifies that policy changes trigger rule updates that respect current foregroundActivities status. Also verifies logic that promotes a UID based on its most-foreground PID. Verifies that policy changes result in immediate rule changes. Also verifies that BACKGROUND_DATA_SETTING_CHANGED broadcasts are sent by policy changes. Change-Id: I4fd0dad9e1dbccee2c5968244bb1814e6cb2c6e1
/frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
|