d5cc0feb742b98abc88f9fbaa0714657f929ec5a |
|
19-Jan-2018 |
Lorenzo Colitti <lorenzo@google.com> |
Add the defaultNetwork element to the netstats.proto. This is in its own commit because AOSP has diverged from internal master. Bug: 35142602 Test: builds, boots Change-Id: I75fc85b961bc919e3d6c2adce6d6861c6f2c8379
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
d3e4a1e250194bbf59b1e04b60711f97001f61f8 |
|
18-Jan-2018 |
Lorenzo Colitti <lorenzo@google.com> |
Track and persist in stats whether traffic is on the default network. This change adds the defaultNetwork to the ident based on current system networking state, and persists that value to flash. Bug: 35142602 Test: runtest frameworks-net Test: downloaded files using default/non-default networks while watching dumpsys netstats Change-Id: Id8776d149b2977548a9eb455ad4926af55e25aba
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
220871a697290529278ed16db508eda8e12f3fc7 |
|
14-Nov-2017 |
Xin Li <delphij@google.com> |
Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master. Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7 Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
|
72f9c42b9e59761a28d6b32c42f65de57c98daed |
|
28-Oct-2017 |
Jeff Sharkey <jsharkey@android.com> |
Define NOT_ROAMING network capability. The "roaming" state of a network really belongs on NetworkCapabilities instead of being published through NetworkInfo.isRoaming(). One major reason is to support developers creating NetworkRequests for a non-roaming network. Watch for any capability changes that network statistics are interested in (either metered or roaming) and notify it to perform an update pass; fixes bug where we previously only triggered on roaming changes. Fix bug in VPNs where metered/roaming capabilities of underlying networks weren't being propagated; this was probably preventing some jobs from running over unmetered networks, and causing other jobs to run over roaming networks! Also passes along link bandwidth information from underlying networks, and propegates any changes to underlying networks. Fix race condition by reading prevNc inside lock. Utility methods correctly calculate min/max link bandwidth values. Test: bit FrameworksNetTests:android.net.,com.android.server.net.,com.android.server.connectivity.,com.android.server.ConnectivityServiceTest Bug: 68397798, 16207332 Change-Id: I3e1a6544c902bf3a79356b72d3616af1fd2b0f49
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
5ab024333065c60620867e58eaa27f27dfa85752 |
|
27-Jun-2017 |
Jeff Sharkey <jsharkey@android.com> |
Only require that system UIDs tag their sockets. Apps with a normal UID are typically isolated enough to not require socket tagging; we're mostly interested in tracking down internal UIDs that have lots of code sharing the same UID. Also fix up everyone doing manual string checks of Build.TYPE, since we now have first-class fields for those. Bug: 38126076 Test: builds, boots Change-Id: I3a40348196bd8459289f2b9355d9783a07f1e7dd
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
da65a52f87ca1a31c9e01e99756e38d37d7e7202 |
|
13-Jan-2017 |
Makoto Onuki <omakoto@google.com> |
Support protofied dumpsys for NetStats Bug 34228873 Test: manual tests with "incident_report netstats" Change-Id: I359b364c64d9798fd4229018a905658d5d46ea5c
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
25147878974f82f875062e99cdee85dd33f3f078 |
|
21-Oct-2016 |
Stephen Chen <stewchen@google.com> |
Implement metered tracking for NetworkStats summary queries. Dependent on ag/1550196 where API is defined. Bug: 31015360 Bug: 26545374 Test: runtest --path frameworks/base/core/tests/coretests/src/android/net/NetworkStatsTest.java, other test classes. Change-Id: I968b9e3352d7880e3fc438f12de628a2da057e0a
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
bfd1d6ed49579edca1494eb690dfa552c56b58b2 |
|
24-Aug-2016 |
Jack Yu <jackyu@google.com> |
Do not print misleading debug messages in some scenarios. When the mobile network is not active, querying the network information might trigger the misleading debug messages. Added some condition checks to prevent this. bug: 30850733 Change-Id: Ice6d548a56f98bac7fe2ca6a06148350b505533d
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
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/core/java/android/net/NetworkIdentity.java
|
6973634ce61ab7d4c1d51c70be6d51725b89e7b9 |
|
08-Dec-2014 |
Jeff Sharkey <jsharkey@android.com> |
Direct notification of network interface changes. Connectivity broadcasts recently changed and are no longer sent for certain types of network changes. For example, when stacked network interfaces change for a mobile network. To ensure that we pick up all these details, directly wire the two services together. Also remove some unused code for split network types. Bug: 18666753 Change-Id: I0467bd5b330c0e0cb51af2306d821b41ad16337a
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
3256601f5e4d94713f59e97b9d4912875c1bdcaf |
|
03-Dec-2014 |
Jeff Sharkey <jsharkey@android.com> |
Offer to "merge" subscribers for data usage. There are some cases where multiple subscriber identities (IMSI) should be treated as "merged together" from a data usage perspective. This is done by extending the template used for matching purposes to support multiple subscribers. Then, when we query historical usage or set network policies, we normalize the matching template to merge to any other identities that should be included. When normalizing, the "lowest" identity is always used for equality and storage purposes, which allows identities to come and go over time. This change also fixes data usage recording for multi-SIM devices by passing along the concrete subscriber identity for each network interface. Also correctly create default policies for multi-SIM devices. This change also drops setPolicyDataEnable() until it can be wired up to the right underlying NetworkAgent. (This means we still bring up the network, and then rely on iptables rules to block traffic when over the limit, instead of proactively disabling the connection.) Bug: 18012787 Change-Id: If6acf32009fdfea2b836f5aff8e2f3e5e0248b4a
/frameworks/base/core/java/android/net/NetworkIdentity.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/core/java/android/net/NetworkIdentity.java
|
e6585b32ea586743258a5457e2184ffc087f2d2f |
|
13-Dec-2013 |
Kenny Root <kroot@google.com> |
Use java.util.Objects instead on internal API Not needed since java.util.Objects implements all the needed functionality. Change-Id: Icd31d49a9801d1705427f028e9ac927d58e7d34c
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
e8914c36276710de50b347c1e6aecfa45d6a56cd |
|
02-May-2012 |
Jeff Sharkey <jsharkey@android.com> |
Begin collecting xtables iface counters. Add method to parse new iface_stat_fmt proc stats, or return null when kernel support is unavailable. Add test and remove older, unused parsing code. Create new "xt" recorder to persist the new xtables counters when available. Add SSID support to NetworkIdentity to fix policy tests. Bug: 6422414 Change-Id: I77f70e9acb79a559ab626f3af5c4f3599801ed43
/frameworks/base/core/java/android/net/NetworkIdentity.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/core/java/android/net/NetworkIdentity.java
|
d4dd7716fb825f29a609c5c4cb31204eea78183a |
|
16-Mar-2012 |
Jeff Sharkey <jsharkey@android.com> |
Combine network subtypes by default. Subtype controls (3G-vs-4G) aren't exposed in the UI, so tracking data with that granularity creates unnecessary overhead. For example, some GSM networks can regularly flap between two subtypes. Bug: 6118868 Change-Id: Id098891dba52336d00d0f96632a7924e228b4713
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
f9a3a8d42b43adeadf41c8896f010d381f15f505 |
|
16-Dec-2011 |
Jeff Sharkey <jsharkey@android.com> |
Include roaming in NetworkIdentity.hashCode(). Change-Id: I148d95c8d08e3916a90fa78f7efee327d4b7de2a
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
02e21d6a5b5117d494777a36783909854854f751 |
|
18-Jul-2011 |
Jeff Sharkey <jsharkey@android.com> |
Data usage notifs, newly installed apps, defaults. Only show warning/limit notifications for active networks, since they aren't actionable for inactive IMSI. Include IMSI in debug output on engineering builds. Move default policy warning to be configured through overlay. Watch for newly installed packages to enforce global policy. Bug: 5038729, 5038541, 4979026, 5023634 Change-Id: I8fc8ab4c23c440a3091504ea16133ed6ababf58e
/frameworks/base/core/java/android/net/NetworkIdentity.java
|
5dc0c26cffbbc62ff84f9f4c8a451e68e2c05d2d |
|
20-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Teach NetworkIdentity about roaming. And correctly upgrade NetworkIdentitySet written to disk, assuming that old values aren't roaming. Bug: 4724762 Change-Id: Ic25897ebbaf43be2390174d8e5fd08386bc8a345
/frameworks/base/core/java/android/net/NetworkIdentity.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/core/java/android/net/NetworkIdentity.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/core/java/android/net/NetworkIdentity.java
|