Merge "[MS18] Augment data usage by default" am: de62afa978 am: 9b52bb78d2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1931615 Change-Id: I2121ae767462cf14198db1d23ee45b54070fc7e2
This commit is contained in:
@@ -139,6 +139,7 @@ public class NetworkStatsManager {
|
|||||||
mContext = context;
|
mContext = context;
|
||||||
mService = service;
|
mService = service;
|
||||||
setPollOnOpen(true);
|
setPollOnOpen(true);
|
||||||
|
setAugmentWithSubscriptionPlan(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
|
|||||||
@@ -655,8 +655,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public INetworkStatsSession openSession() {
|
public INetworkStatsSession openSession() {
|
||||||
// NOTE: if callers want to get non-augmented data, they should go
|
|
||||||
// through the public API
|
|
||||||
return openSessionInternal(NetworkStatsManager.FLAG_AUGMENT_WITH_SUBSCRIPTION_PLAN, null);
|
return openSessionInternal(NetworkStatsManager.FLAG_AUGMENT_WITH_SUBSCRIPTION_PLAN, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -876,8 +874,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
|||||||
private long getNetworkTotalBytes(NetworkTemplate template, long start, long end) {
|
private long getNetworkTotalBytes(NetworkTemplate template, long start, long end) {
|
||||||
assertSystemReady();
|
assertSystemReady();
|
||||||
|
|
||||||
// NOTE: if callers want to get non-augmented data, they should go
|
|
||||||
// through the public API
|
|
||||||
return internalGetSummaryForNetwork(template,
|
return internalGetSummaryForNetwork(template,
|
||||||
NetworkStatsManager.FLAG_AUGMENT_WITH_SUBSCRIPTION_PLAN, start, end,
|
NetworkStatsManager.FLAG_AUGMENT_WITH_SUBSCRIPTION_PLAN, start, end,
|
||||||
NetworkStatsAccess.Level.DEVICE, Binder.getCallingUid()).getTotalBytes();
|
NetworkStatsAccess.Level.DEVICE, Binder.getCallingUid()).getTotalBytes();
|
||||||
|
|||||||
Reference in New Issue
Block a user