Merge "[MS18] Augment data usage by default" am: de62afa978

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1931615

Change-Id: I72276ebd4a3fc42ab9459dafcaa4c232ca4d9442
This commit is contained in:
Treehugger Robot
2021-12-28 06:43:03 +00:00
committed by Automerger Merge Worker
2 changed files with 1 additions and 4 deletions

View File

@@ -139,6 +139,7 @@ public class NetworkStatsManager {
mContext = context; mContext = context;
mService = service; mService = service;
setPollOnOpen(true); setPollOnOpen(true);
setAugmentWithSubscriptionPlan(true);
} }
/** @hide */ /** @hide */

View File

@@ -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();