OSDN Git Service

Support passing a template to NetworkStatsManager queries.
authorLorenzo Colitti <lorenzo@google.com>
Mon, 22 Jan 2018 12:00:49 +0000 (21:00 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Tue, 23 Jan 2018 09:38:48 +0000 (18:38 +0900)
commitd15c937f972b08e62516f361cf6bbe95b64132ce
tree196e5130866bccbebf1131ccd6b7fbafca6dec15
parent0f9bce6883f2bbf1de1620d4014f037063d6d7b1
Support passing a template to NetworkStatsManager queries.

Currently, NetworkStatsManager queries and callbacks only allow
selecting network traffic based on network identifiers:
networkType, subscriptionId and networkId.  The code ends up
converting these into a template under the hood.

Now that templates can express more fine-grained queries (e.g.,
select only roaming traffic, or select only traffic that's not
on the default network) add a hidden method to pass in a
template. This should have no security implications, as all the
access controls are performed in NetworkStatsService.

Bug: 35142602
Test: android.app.usage.cts.NetworkUsageStatsTest passes
Change-Id: Iab4afa26b34544299d2a9c501c1b0feb470e90a9
Merged-In: Iab4afa26b34544299d2a9c501c1b0feb470e90a9
core/java/android/app/usage/NetworkStatsManager.java