Match NetworkStatsService refactoring.
Change-Id: Ia5c7fa6e60dd1915939437c859af696fb01498bc
This commit is contained in:
@@ -32,6 +32,7 @@ import android.graphics.Color;
|
|||||||
import android.net.INetworkPolicyManager;
|
import android.net.INetworkPolicyManager;
|
||||||
import android.net.INetworkStatsService;
|
import android.net.INetworkStatsService;
|
||||||
import android.net.NetworkPolicyManager;
|
import android.net.NetworkPolicyManager;
|
||||||
|
import android.net.NetworkStats;
|
||||||
import android.net.NetworkStatsHistory;
|
import android.net.NetworkStatsHistory;
|
||||||
import android.net.NetworkTemplate;
|
import android.net.NetworkTemplate;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -162,7 +163,7 @@ public class DataUsageAppDetail extends Fragment {
|
|||||||
try {
|
try {
|
||||||
// load stats for current uid and template
|
// load stats for current uid and template
|
||||||
// TODO: read template from extras
|
// TODO: read template from extras
|
||||||
mHistory = mStatsService.getHistoryForUid(mTemplate, mUid);
|
mHistory = mStatsService.getHistoryForUid(mTemplate, mUid, NetworkStats.TAG_NONE);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
// since we can't do much without history, and we don't want to
|
// since we can't do much without history, and we don't want to
|
||||||
// leave with half-baked UI, we bail hard.
|
// leave with half-baked UI, we bail hard.
|
||||||
|
@@ -598,7 +598,7 @@ public class DataUsageSummary extends Fragment {
|
|||||||
protected NetworkStats doInBackground(Void... params) {
|
protected NetworkStats doInBackground(Void... params) {
|
||||||
try {
|
try {
|
||||||
final long[] range = mChart.getInspectRange();
|
final long[] range = mChart.getInspectRange();
|
||||||
return mStatsService.getSummaryForAllUid(mTemplate, range[0], range[1]);
|
return mStatsService.getSummaryForAllUid(mTemplate, range[0], range[1], false);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "problem reading stats");
|
Log.w(TAG, "problem reading stats");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user