Use the new network stats loader to get usage data for all apps.
- change to use the new NetworkStats.Bucket instead of NetworkStats.Entry when iterating through the detail data. Bug: 111751694 Test: make RunSettingsRoboTests Change-Id: I305cc384320e4a72531d80dd9a00a3034ab12837
This commit is contained in:
@@ -17,6 +17,7 @@ package com.android.settings.datausage;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.TypedArray;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkTemplate;
|
||||
import android.os.Bundle;
|
||||
import android.util.AttributeSet;
|
||||
@@ -81,6 +82,8 @@ public class DataUsagePreference extends Preference implements TemplatePreferenc
|
||||
if (FeatureFlagUtils.isEnabled(getContext(), FeatureFlags.DATA_USAGE_V2)) {
|
||||
args.putParcelable(DataUsageListV2.EXTRA_NETWORK_TEMPLATE, mTemplate);
|
||||
args.putInt(DataUsageListV2.EXTRA_SUB_ID, mSubId);
|
||||
args.putInt(DataUsageListV2.EXTRA_NETWORK_TYPE, mTemplate.isMatchRuleMobile()
|
||||
? ConnectivityManager.TYPE_MOBILE : ConnectivityManager.TYPE_WIFI);
|
||||
launcher = new SubSettingLauncher(getContext())
|
||||
.setArguments(args)
|
||||
.setDestination(DataUsageListV2.class.getName())
|
||||
|
Reference in New Issue
Block a user