Lines Matching defs:NetworkStats
29 import static android.net.NetworkStats.IFACE_ALL;
30 import static android.net.NetworkStats.SET_ALL;
31 import static android.net.NetworkStats.SET_DEFAULT;
32 import static android.net.NetworkStats.SET_FOREGROUND;
33 import static android.net.NetworkStats.TAG_NONE;
34 import static android.net.NetworkStats.UID_ALL;
73 import android.net.NetworkStats;
74 import android.net.NetworkStats.NonMonotonicException;
129 private static final String TAG = "NetworkStats";
211 private NetworkStats mLastPollNetworkDevSnapshot;
212 private NetworkStats mLastPollNetworkXtSnapshot;
213 private NetworkStats mLastPollUidSnapshot;
214 private NetworkStats mLastPollOperationsSnapshot;
216 private NetworkStats mLastPersistNetworkDevSnapshot;
217 private NetworkStats mLastPersistNetworkXtSnapshot;
218 private NetworkStats mLastPersistUidSnapshot;
224 private NetworkStats mOperations = new NetworkStats(0L, 10);
436 public NetworkStats getSummaryForNetwork(NetworkTemplate template, long start, long end) {
441 private NetworkStats getSummaryForNetworkDev(NetworkTemplate template, long start, long end) {
445 private NetworkStats getSummaryForNetworkXt(NetworkTemplate template, long start, long end) {
449 private NetworkStats getSummaryForNetwork(NetworkTemplate template, long start, long end,
455 final NetworkStats stats = new NetworkStats(end - start, 1);
456 final NetworkStats.Entry entry = new NetworkStats.Entry();
494 public NetworkStats getSummaryForAllUid(
504 final NetworkStats stats = new NetworkStats(end - start, 24);
505 final NetworkStats.Entry entry = new NetworkStats.Entry();
539 public NetworkStats getDataLayerSnapshotForUid(int uid) throws RemoteException {
546 final NetworkStats networkLayer = mNetworkManager.getNetworkStatsUidDetail(uid);
547 final NetworkStats dataLayer = new NetworkStats(
550 NetworkStats.Entry entry = null;
781 mLastPollOperationsSnapshot = new NetworkStats(0L, 0);
823 final NetworkStats uidSnapshot;
824 final NetworkStats networkXtSnapshot;
825 final NetworkStats networkDevSnapshot;
828 final NetworkStats tetherSnapshot = getNetworkStatsTethering();
892 private void performNetworkDevPollLocked(NetworkStats networkDevSnapshot, long currentTime) {
895 final NetworkStats delta = computeStatsDelta(
899 NetworkStats.Entry entry = null;
922 private void performNetworkXtPollLocked(NetworkStats networkXtSnapshot, long currentTime) {
925 final NetworkStats delta = computeStatsDelta(
929 NetworkStats.Entry entry = null;
952 private void performUidPollLocked(NetworkStats uidSnapshot, long currentTime) {
955 final NetworkStats delta = computeStatsDelta(
957 final NetworkStats operationsDelta = computeStatsDelta(
961 NetworkStats.Entry entry = null;
962 NetworkStats.Entry operationsEntry = null;
1006 NetworkStats.Entry devTotal = null;
1007 NetworkStats.Entry xtTotal = null;
1008 NetworkStats.Entry uidTotal = null;
1452 pw.print(" set="); pw.print(NetworkStats.setToString(key.set));
1453 pw.print(" tag="); pw.println(NetworkStats.tagToString(key.tag));
1543 * Return the delta between two {@link NetworkStats} snapshots, where {@code
1546 private NetworkStats computeStatsDelta(
1547 NetworkStats before, NetworkStats current, boolean collectStale, String type) {
1567 return new NetworkStats(0L, 10);
1576 return new NetworkStats(0L, 10);
1582 * {@link NetworkStats} if any problems are encountered.
1584 private NetworkStats getNetworkStatsTethering() throws RemoteException {
1590 return new NetworkStats(0L, 10);
1594 NetworkStats computeNetworkXtSnapshotFromUid(NetworkStats uidSnapshot) {