/frameworks/base/tests/net/java/android/net/ |
D | NetworkStatsTest.java | 19 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL; 20 import static android.net.NetworkStats.DEFAULT_NETWORK_NO; 21 import static android.net.NetworkStats.DEFAULT_NETWORK_YES; 22 import static android.net.NetworkStats.IFACE_ALL; 23 import static android.net.NetworkStats.INTERFACES_ALL; 24 import static android.net.NetworkStats.METERED_ALL; 25 import static android.net.NetworkStats.METERED_NO; 26 import static android.net.NetworkStats.METERED_YES; 27 import static android.net.NetworkStats.ROAMING_ALL; 28 import static android.net.NetworkStats.ROAMING_NO; [all …]
|
D | NetworkStatsHistoryTest.java | 110 new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); in testRecordSingleBucket() 124 new NetworkStats.Entry(1024L, 10L, 128L, 2L, 2L)); in testRecordEqualBuckets() 141 new NetworkStats.Entry(1000L, 2000L, 5000L, 10000L, 100L)); in testRecordTouchingBuckets() 161 new NetworkStats.Entry(128L, 2L, 256L, 4L, 1L)); in testRecordGapBuckets() 163 new NetworkStats.Entry(64L, 1L, 512L, 8L, 2L)); in testRecordGapBuckets() 174 new NetworkStats.Entry(2048L, 4L, 2048L, 4L, 2L)); in testRecordGapBuckets() 191 new NetworkStats.Entry(256L, 2L, 256L, 2L, 1L)); in testRecordOverlapBuckets() 194 new NetworkStats.Entry(1024L, 10L, 1024L, 10L, 10L)); in testRecordOverlapBuckets() 332 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testFuzzing() 371 new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 4L)); in testIgnoreFields() [all …]
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkStatsFactory.java | 19 import static android.net.NetworkStats.SET_ALL; 20 import static android.net.NetworkStats.TAG_ALL; 21 import static android.net.NetworkStats.TAG_NONE; 22 import static android.net.NetworkStats.UID_ALL; 28 import android.net.NetworkStats; 75 private final NetworkStats mPersistSnapshot; 102 if (requiredIfaces == NetworkStats.INTERFACES_ALL) { in augmentWithStackedInterfaces() 127 public static void apply464xlatAdjustments(NetworkStats baseTraffic, in apply464xlatAdjustments() 128 NetworkStats stackedTraffic, boolean useBpfStats) { in apply464xlatAdjustments() 129 NetworkStats.apply464xlatAdjustments(baseTraffic, stackedTraffic, sStackedIfaces, in apply464xlatAdjustments() [all …]
|
D | NetworkStatsService.java | 29 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL; 30 import static android.net.NetworkStats.IFACE_ALL; 31 import static android.net.NetworkStats.INTERFACES_ALL; 32 import static android.net.NetworkStats.METERED_ALL; 33 import static android.net.NetworkStats.ROAMING_ALL; 34 import static android.net.NetworkStats.SET_ALL; 35 import static android.net.NetworkStats.SET_DEFAULT; 36 import static android.net.NetworkStats.SET_FOREGROUND; 37 import static android.net.NetworkStats.STATS_PER_IFACE; 38 import static android.net.NetworkStats.STATS_PER_UID; [all …]
|
D | NetworkStatsCollection.java | 19 import static android.net.NetworkStats.DEFAULT_NETWORK_NO; 20 import static android.net.NetworkStats.DEFAULT_NETWORK_YES; 21 import static android.net.NetworkStats.IFACE_ALL; 22 import static android.net.NetworkStats.METERED_NO; 23 import static android.net.NetworkStats.METERED_YES; 24 import static android.net.NetworkStats.ROAMING_NO; 25 import static android.net.NetworkStats.ROAMING_YES; 26 import static android.net.NetworkStats.SET_ALL; 27 import static android.net.NetworkStats.SET_DEFAULT; 28 import static android.net.NetworkStats.TAG_NONE; [all …]
|
D | NetworkStatsObservers.java | 25 import android.net.NetworkStats; 104 public void updateStats(NetworkStats xtSnapshot, NetworkStats uidSnapshot, in updateStats() 366 NetworkStats stats = mCollection.getSummary(template, in getTotalBytesForNetwork() 410 NetworkStats.SET_ALL, NetworkStats.TAG_NONE, in getTotalBytesForNetworkUid() 426 NetworkStats mXtSnapshot; 427 NetworkStats mUidSnapshot; 433 StatsContext(NetworkStats xtSnapshot, NetworkStats uidSnapshot, in StatsContext()
|
/frameworks/base/core/java/android/app/usage/ |
D | NetworkStats.java | 39 public final class NetworkStats implements AutoCloseable { class 68 private int mTag = android.net.NetworkStats.TAG_NONE; 85 private android.net.NetworkStats mSummary = null; 100 private android.net.NetworkStats.Entry mRecycledSummaryEntry = null; 104 NetworkStats(Context context, NetworkTemplate template, int flags, long startTimestamp, in NetworkStats() method in NetworkStats 161 public static final int UID_ALL = android.net.NetworkStats.UID_ALL; 266 public static final int TAG_NONE = android.net.NetworkStats.TAG_NONE; 283 case STATE_ALL: return android.net.NetworkStats.SET_ALL; in convertSet() 284 case STATE_DEFAULT: return android.net.NetworkStats.SET_DEFAULT; in convertSet() 285 case STATE_FOREGROUND: return android.net.NetworkStats.SET_FOREGROUND; in convertSet() [all …]
|
D | NetworkStatsManager.java | 25 import android.app.usage.NetworkStats.Bucket; 171 NetworkStats stats = new NetworkStats(mContext, template, mFlags, startTime, endTime, in querySummaryForDevice() 244 NetworkStats stats; in querySummaryForUser() 245 stats = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService); in querySummaryForUser() 271 public NetworkStats querySummary(int networkType, String subscriberId, long startTime, in querySummary() 285 public NetworkStats querySummary(NetworkTemplate template, long startTime, in querySummary() 287 NetworkStats result; in querySummary() 288 result = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService); in querySummary() 299 public NetworkStats queryDetailsForUid(int networkType, String subscriberId, in queryDetailsForUid() 302 NetworkStats.Bucket.TAG_NONE, NetworkStats.Bucket.STATE_ALL); in queryDetailsForUid() [all …]
|
/frameworks/base/tests/net/java/android/app/usage/ |
D | NetworkStatsManagerTest.java | 36 import android.net.NetworkStats.Entry; 80 android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE, in testQueryDetails() 85 android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE, in testQueryDetails() 89 android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE, in testQueryDetails() 94 android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE, in testQueryDetails() 110 eq(uid1), eq(android.net.NetworkStats.SET_ALL), in testQueryDetails() 111 eq(android.net.NetworkStats.TAG_NONE), in testQueryDetails() 121 eq(uid2), eq(android.net.NetworkStats.SET_ALL), in testQueryDetails() 122 eq(android.net.NetworkStats.TAG_NONE), in testQueryDetails() 132 NetworkStats stats = mManager.queryDetails( in testQueryDetails() [all …]
|
/frameworks/base/tests/net/java/com/android/server/net/ |
D | NetworkStatsServiceTest.java | 25 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL; 26 import static android.net.NetworkStats.DEFAULT_NETWORK_NO; 27 import static android.net.NetworkStats.DEFAULT_NETWORK_YES; 28 import static android.net.NetworkStats.IFACE_ALL; 29 import static android.net.NetworkStats.INTERFACES_ALL; 30 import static android.net.NetworkStats.METERED_ALL; 31 import static android.net.NetworkStats.METERED_NO; 32 import static android.net.NetworkStats.METERED_YES; 33 import static android.net.NetworkStats.ROAMING_ALL; 34 import static android.net.NetworkStats.ROAMING_NO; [all …]
|
D | NetworkStatsFactoryTest.java | 19 import static android.net.NetworkStats.DEFAULT_NETWORK_NO; 20 import static android.net.NetworkStats.METERED_NO; 21 import static android.net.NetworkStats.ROAMING_NO; 22 import static android.net.NetworkStats.SET_ALL; 23 import static android.net.NetworkStats.SET_DEFAULT; 24 import static android.net.NetworkStats.SET_FOREGROUND; 25 import static android.net.NetworkStats.TAG_NONE; 26 import static android.net.NetworkStats.UID_ALL; 34 import android.net.NetworkStats; 91 final NetworkStats stats = parseDetailedStats(R.raw.xt_qtaguid_typical); in testNetworkStatsDetail() [all …]
|
D | NetworkStatsObserversTest.java | 20 import static android.net.NetworkStats.DEFAULT_NETWORK_NO; 21 import static android.net.NetworkStats.DEFAULT_NETWORK_YES; 22 import static android.net.NetworkStats.METERED_NO; 23 import static android.net.NetworkStats.ROAMING_NO; 24 import static android.net.NetworkStats.SET_DEFAULT; 25 import static android.net.NetworkStats.TAG_NONE; 41 import android.net.NetworkStats; 246 NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) in testUpdateStats_initialSample_doesNotNotify() 248 NetworkStats uidSnapshot = null; in testUpdateStats_initialSample_doesNotNotify() 271 NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) in testUpdateStats_belowThreshold_doesNotNotify() [all …]
|
D | NetworkStatsCollectionTest.java | 20 import static android.net.NetworkStats.SET_ALL; 21 import static android.net.NetworkStats.SET_DEFAULT; 22 import static android.net.NetworkStats.TAG_NONE; 23 import static android.net.NetworkStats.UID_ALL; 39 import android.net.NetworkStats; 200 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testStartEndAtomicBuckets() 213 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testAccessLevels() 473 new NetworkStats.Entry(12_730_893_164L, 1, 0, 0, 0)); in testAugmentPlanGigantic() 554 final NetworkStats.Entry actual = collection.getSummary( in assertSummaryTotal() 562 final NetworkStats.Entry actual = collection.getSummary( in assertSummaryTotalIncludingTags() [all …]
|
/frameworks/base/core/tests/benchmarks/src/android/net/ |
D | NetworkStatsBenchmark.java | 29 private NetworkStats mNetworkStats; 33 mNetworkStats = new NetworkStats(0, mSize + 2); in setUp() 35 NetworkStats.Entry recycle = new NetworkStats.Entry(); in setUp() 40 recycle.tag = NetworkStats.TAG_NONE; in setUp() 53 recycle.set = NetworkStats.SET_FOREGROUND; in setUp() 54 recycle.tag = NetworkStats.TAG_NONE; in setUp() 65 NetworkStats stats = mNetworkStats.clone(); in timeMigrateTun() 77 NetworkStats stats = mNetworkStats.clone(); in timeClone()
|
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/ |
D | BandwidthTest.java | 23 import android.net.NetworkStats; 24 import android.net.NetworkStats.Entry; 119 NetworkStats pre_test_stats = fetchDataFromProc(mUid); in downloadFile() 127 NetworkStats prof_stats = TrafficStats.stopDataProfiling(mContext); in downloadFile() 130 NetworkStats post_test_stats = fetchDataFromProc(mUid); in downloadFile() 131 NetworkStats proc_stats = post_test_stats.subtract(pre_test_stats); in downloadFile() 179 NetworkStats pre_test_stats = fetchDataFromProc(mUid); in uploadFile() 182 NetworkStats prof_stats = TrafficStats.stopDataProfiling(mContext); in uploadFile() 184 NetworkStats post_test_stats = fetchDataFromProc(mUid); in uploadFile() 185 NetworkStats proc_stats = post_test_stats.subtract(pre_test_stats); in uploadFile() [all …]
|
/frameworks/base/core/java/android/net/ |
D | NetworkStats.java | 50 public class NetworkStats implements Parcelable { class 271 public NetworkStats(long elapsedRealtime, int initialSize) { in NetworkStats() method in NetworkStats 295 public NetworkStats(Parcel parcel) { in NetworkStats() method in NetworkStats 333 public NetworkStats clone() { in clone() 334 final NetworkStats clone = new NetworkStats(elapsedRealtime, size); in clone() 335 NetworkStats.Entry entry = null; in clone() 363 public NetworkStats addIfaceValues( in addIfaceValues() 370 public NetworkStats addValues(String iface, int uid, int set, int tag, long rxBytes, in addValues() 377 public NetworkStats addValues(String iface, int uid, int set, int tag, int metered, int roaming, in addValues() 389 public NetworkStats addValues(Entry entry) { in addValues() [all …]
|
D | INetworkStatsSession.aidl | 19 import android.net.NetworkStats; 27 NetworkStats getDeviceSummaryForNetwork(in NetworkTemplate template, long start, long end); in getDeviceSummaryForNetwork() 31 NetworkStats getSummaryForNetwork(in NetworkTemplate template, long start, long end); in getSummaryForNetwork() 38 …NetworkStats getSummaryForAllUid(in NetworkTemplate template, long start, long end, boolean includ… in getSummaryForAllUid()
|
D | NetworkTemplate.java | 26 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL; 27 import static android.net.NetworkStats.DEFAULT_NETWORK_NO; 28 import static android.net.NetworkStats.DEFAULT_NETWORK_YES; 29 import static android.net.NetworkStats.METERED_ALL; 30 import static android.net.NetworkStats.METERED_NO; 31 import static android.net.NetworkStats.METERED_YES; 32 import static android.net.NetworkStats.ROAMING_ALL; 33 import static android.net.NetworkStats.ROAMING_NO; 34 import static android.net.NetworkStats.ROAMING_YES; 264 builder.append(", metered=").append(NetworkStats.meteredToString(mMetered)); in toString() [all …]
|
D | INetworkStatsService.aidl | 23 import android.net.NetworkStats; 48 NetworkStats getDataLayerSnapshotForUid(int uid); in getDataLayerSnapshotForUid() 57 NetworkStats getDetailedUidStats(in String[] requiredIfaces); in getDetailedUidStats()
|
/frameworks/base/tests/benchmarks/src/com/android/server/net/ |
D | NetworkStatsFactoryBenchmark.java | 19 import android.net.NetworkStats; 43 NetworkStatsFactory.javaReadNetworkStatsDetail(mStats, NetworkStats.UID_ALL, in timeReadNetworkStatsDetailJava() 52 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 0); in timeReadNetworkStatsDetailNative() 54 stats, mStats.getAbsolutePath(), NetworkStats.UID_ALL, in timeReadNetworkStatsDetailNative()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/ |
D | DataUsageControllerTest.java | 31 import android.app.usage.NetworkStats; 107 .thenReturn(mock(NetworkStats.Bucket.class)); in getHistoricalUsageLevel_noUsageData_shouldReturn0() 116 final NetworkStats.Bucket bucket = mock(NetworkStats.Bucket.class); in getHistoricalUsageLevel_hasUsageData_shouldReturnTotalUsage() 132 final NetworkStats.Bucket defaultSubscriberBucket = mock(NetworkStats.Bucket.class); in getDataUsageInfo_hasUsageData_shouldReturnCorrectUsageForExplicitSubId() 141 final NetworkStats.Bucket nonDefaultSubscriberBucket = mock(NetworkStats.Bucket.class); in getDataUsageInfo_hasUsageData_shouldReturnCorrectUsageForExplicitSubId()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/ |
D | NetworkCycleDataForUidLoader.java | 19 import static android.app.usage.NetworkStats.Bucket.STATE_FOREGROUND; 20 import static android.net.NetworkStats.TAG_NONE; 22 import android.app.usage.NetworkStats; 56 final NetworkStats stats = mNetworkStatsManager.queryDetailsForUid( in recordUsage() 102 final NetworkStats stats = mNetworkStatsManager.queryDetailsForUidTagState(
|
D | SummaryForAllUidLoader.java | 22 import android.net.NetworkStats; 33 public class SummaryForAllUidLoader extends AsyncTaskLoader<NetworkStats> { 62 public NetworkStats loadInBackground() { in loadInBackground()
|
/frameworks/base/core/java/android/os/ |
D | INetworkManagementService.aidl | 24 import android.net.NetworkStats; 252 NetworkStats getNetworkStatsSummaryDev(); in getNetworkStatsSummaryDev() 253 NetworkStats getNetworkStatsSummaryXt(); in getNetworkStatsSummaryXt() 259 NetworkStats getNetworkStatsDetail(); in getNetworkStatsDetail() 267 NetworkStats getNetworkStatsUidDetail(int uid, in String[] ifaces); in getNetworkStatsUidDetail() 272 NetworkStats getNetworkStatsTethering(int how); in getNetworkStatsTethering()
|
/frameworks/base/tests/DataIdleTest/src/com/android/tests/dataidle/ |
D | DataIdleTest.java | 21 import android.net.NetworkStats; 22 import android.net.NetworkStats.Entry; 79 final NetworkStats stats = session.getSummaryForAllUid( in fetchStats() 93 void reportStats(NetworkStats stats) { in reportStats()
|