History log of /frameworks/base/core/java/android/net/NetworkTemplate.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/NetworkTemplate.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/NetworkTemplate.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/NetworkTemplate.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/NetworkTemplate.java
2e4dce0dd24aa89ca6adf6559f13d3e342ff8558 19-Dec-2012 Jeff Sharkey <jsharkey@android.com> Fix metered SSID matching regression.

WifiInfo changed to return SSIDs with quotes included, so relax our
identity matching to accept matches regardless of quotedness.

Bug: 7695807
Change-Id: Ib5d06666035e06b2d4b2f7cb498767d63b1b1828
/frameworks/base/core/java/android/net/NetworkTemplate.java
8b2c3a14603d163d7564e6f60286995079687690 12-Nov-2012 Jeff Sharkey <jsharkey@android.com> Useful annotations for code documentation.

Bug: 6537978
Change-Id: I806c3c09e3255f8789455f13bf37c1dde2a93f1f
/frameworks/base/core/java/android/net/NetworkTemplate.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/core/java/android/net/NetworkTemplate.java
234766a36af6214644fa8205202287084ca9cf93 11-Apr-2012 Jeff Sharkey <jsharkey@android.com> Move TrafficStats iface counters to xt_qtaguid.

Use xt_qtaguid iface_stat_all counters, which are monotonic during
a single boot.

Track all ifaces associated with mobile networks since boot, and
move TrafficStats to using these ifaces. This will include usage of
networks omitted from config_data_usage_network_types, specifically
on devices that recycle network interfaces across APNs.

Split wildcard template matching, and move NetworkStatsService to
use mobile wildcard when logging stats.

Bug: 5324515
Change-Id: I2211c374c05d1b598cc647f2f873630538955ffe
/frameworks/base/core/java/android/net/NetworkTemplate.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/NetworkTemplate.java
f9f1d066785a829c4906b0f31580b31b30892ad7 16-Mar-2012 Jeff Sharkey <jsharkey@android.com> Remove network subtype check when building template.

Change-Id: I069d82a77d27dae6bfffe3b7e65d73b63f258ad9
/frameworks/base/core/java/android/net/NetworkTemplate.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/NetworkTemplate.java
3ca7481439c9b65a137d7705d0f4a16766529e75 25-Jan-2012 Jeff Sharkey <jsharkey@android.com> Match WIFI_P2P data usage.

Bug: 5405891
Change-Id: I5b815d6fc25a2f26a86c39a43fde305fcc3fb65c
/frameworks/base/core/java/android/net/NetworkTemplate.java
630a1712168f402653039e368259cb9480454fa8 26-Sep-2011 Jeff Sharkey <jsharkey@android.com> Overlay to configure data usage network types.

Specify which network types should be counted when computing data
usage totals.

Bug: 5361005
Change-Id: I830caed1a29199892d209a692b50f8b3e144cafe
/frameworks/base/core/java/android/net/NetworkTemplate.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/NetworkTemplate.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/core/java/android/net/NetworkTemplate.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/NetworkTemplate.java