summaryrefslogtreecommitdiff
path: root/src/com/android/settings/datausage/lib/DataUsageLib.java
AgeCommit message (Collapse)Author
2021-06-05Usage Settings: Fix NPE when subscriberId is Null.Les Lee
For mobile, a old API: buildTemplateMobileAll doesn't includes the merged wifi network, call the new API: buildTemplateCarrierMetered to replace the old one. But new API: buildTemplateCarrierMetered requires non-null subscriberId. Call old API: buildTemplateMobileAll when subscriberId is NULL since the matched result is always empty when subscriberId is NULL. No any different between buildTemplateCarrierMetered and buildTemplateMobileAll. Bug: 190233044 Bug: 190135429 Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageLibTest Change-Id: Ic6dada8260029e47e044d016ebc701c25dbf9b2a
2021-06-01wifi: Use new API for data usage functionlesl
For mobile, a old API: buildTemplateMobileAll doesn't includes the merged wifi network, call the new API: buildTemplateCarrierMetered to replace the old one. PS: Not only usage functionality but also apply to network policy control since the default policy is changing to use new API: buildTemplateCarrier now. Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageLibTest Test: Manual Test, modify the mobile usage warming and limit bytes and check the data via adb shell dumpsys netpolicy Bug: 176396812 Merged-In: I6fbec14e7be4dc4b5c2fd3659a801521c81b233c Change-Id: I6fbec14e7be4dc4b5c2fd3659a801521c81b233c
2021-05-05wifi: Use new API for wifi data usage functionlesl
For wifi, a old API: buildTemplateWifiWildcard will includes the merged wifi which is included to mobile usage. It should not double count again. Call new API: buildTemplateWifi with NetworkId: NetworkTemplate.WIFI_NETWORKID_ALL and null subscriberId to get non-merged wifi usage. Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppDataUsageTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageUtilsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageInfoControllerTest Test: Manual Test, wifi data usage count correctly. Bug: 176396812 Change-Id: Ia4d8fa67ea3cb75c2d35be9ab60e5c5ffa391ffb
2020-06-02[Settings] Move mobile data template out of frameworkBonian Chen
Move mobile data template out of framework Bug: 151751844 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageLibTest Change-Id: I5072cd1e673194d00b3ce82242bf5fbad88d23cd