Merge "wifi: Use new API for data usage function" am: c0245bb982
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1697487 Change-Id: I24ba0a9ea96c9d0ff63b691f10a07b900cbbd399
This commit is contained in:
@@ -111,9 +111,9 @@ public class SettingsDumpService extends Service {
|
||||
for (SubscriptionInfo info : manager.getAvailableSubscriptionInfoList()) {
|
||||
telephonyManager = telephonyManager
|
||||
.createForSubscriptionId(info.getSubscriptionId());
|
||||
NetworkTemplate mobileAll = NetworkTemplate.buildTemplateMobileAll(
|
||||
NetworkTemplate carrier = NetworkTemplate.buildTemplateCarrierMetered(
|
||||
telephonyManager.getSubscriberId());
|
||||
final JSONObject usage = dumpDataUsage(mobileAll, controller);
|
||||
final JSONObject usage = dumpDataUsage(carrier, controller);
|
||||
usage.put("subId", info.getSubscriptionId());
|
||||
array.put(usage);
|
||||
}
|
||||
|
@@ -73,7 +73,7 @@ public class DataUsageLib {
|
||||
|
||||
private static NetworkTemplate getMobileTemplateForSubId(
|
||||
TelephonyManager telephonyManager, int subId) {
|
||||
return NetworkTemplate.buildTemplateMobileAll(
|
||||
return NetworkTemplate.buildTemplateCarrierMetered(
|
||||
telephonyManager.getSubscriberId(subId));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user