Merge "wifi: Use new API for data usage function" into sc-dev
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user