Use the loader to get usage data for each billing cycle.

Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: I4242687b404a290e81d43c505b9afbd2a07aafdb
This commit is contained in:
Doris Ling
2018-09-20 17:10:55 -07:00
parent 7686eb4f85
commit 654adf9c9e
4 changed files with 142 additions and 66 deletions

View File

@@ -352,7 +352,7 @@ public class DataUsageList extends DataUsageBaseFragment {
/**
* Bind the given {@link NetworkStats}, or {@code null} to clear list.
*/
public void bindStats(NetworkStats stats, int[] restrictedUids) {
private void bindStats(NetworkStats stats, int[] restrictedUids) {
ArrayList<AppItem> items = new ArrayList<>();
long largest = 0;
@@ -464,7 +464,7 @@ public class DataUsageList extends DataUsageBaseFragment {
* @param entry the network stats entry to extract data usage from.
* @param itemCategory the item is categorized on the list view by this category. Must be
*/
private static long accumulate(int collapseKey, final SparseArray<AppItem> knownItems,
private long accumulate(int collapseKey, final SparseArray<AppItem> knownItems,
NetworkStats.Entry entry, int itemCategory, ArrayList<AppItem> items, long largest) {
final int uid = entry.uid;
AppItem item = knownItems.get(collapseKey);