Merge "wifi: Use new API for data usage function" into sc-dev

This commit is contained in:
Les Lee
2021-06-02 03:37:54 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 3 deletions

View File

@@ -111,9 +111,9 @@ public class SettingsDumpService extends Service {
for (SubscriptionInfo info : manager.getAvailableSubscriptionInfoList()) { for (SubscriptionInfo info : manager.getAvailableSubscriptionInfoList()) {
telephonyManager = telephonyManager telephonyManager = telephonyManager
.createForSubscriptionId(info.getSubscriptionId()); .createForSubscriptionId(info.getSubscriptionId());
NetworkTemplate mobileAll = NetworkTemplate.buildTemplateMobileAll( NetworkTemplate carrier = NetworkTemplate.buildTemplateCarrierMetered(
telephonyManager.getSubscriberId()); telephonyManager.getSubscriberId());
final JSONObject usage = dumpDataUsage(mobileAll, controller); final JSONObject usage = dumpDataUsage(carrier, controller);
usage.put("subId", info.getSubscriptionId()); usage.put("subId", info.getSubscriptionId());
array.put(usage); array.put(usage);
} }

View File

@@ -73,7 +73,7 @@ public class DataUsageLib {
private static NetworkTemplate getMobileTemplateForSubId( private static NetworkTemplate getMobileTemplateForSubId(
TelephonyManager telephonyManager, int subId) { TelephonyManager telephonyManager, int subId) {
return NetworkTemplate.buildTemplateMobileAll( return NetworkTemplate.buildTemplateCarrierMetered(
telephonyManager.getSubscriberId(subId)); telephonyManager.getSubscriberId(subId));
} }
} }