Home
last modified time | relevance | path

Searched refs:NetworkStats (Results 1 – 25 of 83) sorted by relevance

1234

/packages/modules/Connectivity/tests/unit/java/android/net/
DNetworkStatsTest.java19 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 …]
DNetworkStatsHistoryTest.java19 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
20 import static android.net.NetworkStats.IFACE_ALL;
21 import static android.net.NetworkStats.METERED_NO;
22 import static android.net.NetworkStats.ROAMING_NO;
23 import static android.net.NetworkStats.SET_DEFAULT;
24 import static android.net.NetworkStats.TAG_NONE;
25 import static android.net.NetworkStats.UID_ALL;
121 new NetworkStats.Entry(IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, METERED_NO, in testRecordSingleBucket()
136 new NetworkStats.Entry(IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, METERED_NO, in testRecordEqualBuckets()
154 new NetworkStats.Entry(IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, METERED_NO, in testRecordTouchingBuckets()
[all …]
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DNetworkStatsUtils.java19 import android.app.usage.NetworkStats;
106 public static android.net.NetworkStats fromPublicNetworkStats( in fromPublicNetworkStats()
107 NetworkStats publiceNetworkStats) { in fromPublicNetworkStats()
108 android.net.NetworkStats stats = new android.net.NetworkStats(0L, 0); in fromPublicNetworkStats()
110 NetworkStats.Bucket bucket = new NetworkStats.Bucket(); in fromPublicNetworkStats()
112 final android.net.NetworkStats.Entry entry = fromBucket(bucket); in fromPublicNetworkStats()
119 public static android.net.NetworkStats.Entry fromBucket(NetworkStats.Bucket bucket) { in fromBucket()
120 return new android.net.NetworkStats.Entry( in fromBucket()
131 case NetworkStats.Bucket.STATE_ALL: return SET_ALL; in convertBucketState()
132 case NetworkStats.Bucket.STATE_DEFAULT: return android.net.NetworkStats.SET_DEFAULT; in convertBucketState()
[all …]
/packages/modules/Connectivity/service-t/src/com/android/server/net/
DNetworkStatsFactory.java19 import static android.net.NetworkStats.INTERFACES_ALL;
20 import static android.net.NetworkStats.TAG_ALL;
21 import static android.net.NetworkStats.UID_ALL;
26 import android.net.NetworkStats;
70 private NetworkStats mPersistSnapshot;
74 private NetworkStats mTunAnd464xlatAdjustedStats;
87 public NetworkStats getNetworkStatsDetail() throws IOException { in getNetworkStatsDetail()
88 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 0); in getNetworkStatsDetail()
100 public NetworkStats getNetworkStatsDev() throws IOException { in getNetworkStatsDev()
101 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in getNetworkStatsDev()
[all …]
DTrafficStatsRateLimitCache.java21 import android.net.NetworkStats;
78 public final NetworkStats.Entry entry;
80 TrafficStatsCacheValue(long timestamp, NetworkStats.Entry entry) { in TrafficStatsCacheValue()
97 NetworkStats.Entry get(String iface, int uid) { in get()
123 NetworkStats.Entry getOrCompute(String iface, int uid, in getOrCompute()
124 @NonNull Supplier<NetworkStats.Entry> supplier) { in getOrCompute()
126 final NetworkStats.Entry cachedValue = get(iface, uid); in getOrCompute()
132 final NetworkStats.Entry computedEntry = supplier.get(); in getOrCompute()
147 void put(String iface, int uid, @NonNull final NetworkStats.Entry entry) { in put()
DNetworkStatsService.java30 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
31 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
32 import static android.net.NetworkStats.IFACE_ALL;
33 import static android.net.NetworkStats.IFACE_VT;
34 import static android.net.NetworkStats.INTERFACES_ALL;
35 import static android.net.NetworkStats.METERED_ALL;
36 import static android.net.NetworkStats.METERED_NO;
37 import static android.net.NetworkStats.METERED_YES;
38 import static android.net.NetworkStats.ROAMING_ALL;
39 import static android.net.NetworkStats.ROAMING_NO;
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/server/net/
DNetworkStatsBaseTest.java19 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.METERED_ALL;
23 import static android.net.NetworkStats.METERED_NO;
24 import static android.net.NetworkStats.METERED_YES;
25 import static android.net.NetworkStats.ROAMING_ALL;
26 import static android.net.NetworkStats.ROAMING_NO;
27 import static android.net.NetworkStats.ROAMING_YES;
28 import static android.net.NetworkStats.SET_ALL;
[all …]
DNetworkStatsFactoryTest.java19 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
20 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
21 import static android.net.NetworkStats.METERED_ALL;
22 import static android.net.NetworkStats.METERED_NO;
23 import static android.net.NetworkStats.ROAMING_ALL;
24 import static android.net.NetworkStats.ROAMING_NO;
25 import static android.net.NetworkStats.SET_ALL;
26 import static android.net.NetworkStats.SET_DEFAULT;
27 import static android.net.NetworkStats.SET_FOREGROUND;
28 import static android.net.NetworkStats.TAG_ALL;
[all …]
DNetworkStatsServiceTest.java33 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
34 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
35 import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
36 import static android.net.NetworkStats.IFACE_ALL;
37 import static android.net.NetworkStats.INTERFACES_ALL;
38 import static android.net.NetworkStats.METERED_ALL;
39 import static android.net.NetworkStats.METERED_NO;
40 import static android.net.NetworkStats.METERED_YES;
41 import static android.net.NetworkStats.ROAMING_ALL;
42 import static android.net.NetworkStats.ROAMING_NO;
[all …]
DNetworkStatsObserversTest.java21 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
22 import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
23 import static android.net.NetworkStats.METERED_NO;
24 import static android.net.NetworkStats.METERED_YES;
25 import static android.net.NetworkStats.ROAMING_NO;
26 import static android.net.NetworkStats.SET_DEFAULT;
27 import static android.net.NetworkStats.TAG_NONE;
45 import android.net.NetworkStats;
323 NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) in testUpdateStats_initialSample_doesNotNotify()
325 NetworkStats uidSnapshot = null; in testUpdateStats_initialSample_doesNotNotify()
[all …]
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DNetworkStatsUtilsTest.kt19 import android.net.NetworkStats
81 val bucket = makeMockBucket(android.app.usage.NetworkStats.Bucket.UID_ALL, in testBucketToEntry()
82 android.app.usage.NetworkStats.Bucket.TAG_NONE, in testBucketToEntry()
83 android.app.usage.NetworkStats.Bucket.STATE_DEFAULT, in testBucketToEntry()
84 android.app.usage.NetworkStats.Bucket.METERED_YES, in testBucketToEntry()
85 android.app.usage.NetworkStats.Bucket.ROAMING_NO, in testBucketToEntry()
86 android.app.usage.NetworkStats.Bucket.DEFAULT_NETWORK_ALL, 1024, 8, 2048, 12) in testBucketToEntry()
88 val expectedEntry = NetworkStats.Entry(null /* IFACE_ALL */, NetworkStats.UID_ALL, in testBucketToEntry()
89 NetworkStats.SET_DEFAULT, NetworkStats.TAG_NONE, NetworkStats.METERED_YES, in testBucketToEntry()
90 NetworkStats.ROAMING_NO, NetworkStats.DEFAULT_NETWORK_ALL, 1024, 8, 2048, 12, in testBucketToEntry()
[all …]
/packages/modules/Connectivity/framework-t/src/android/app/usage/
DNetworkStats.java42 public final class NetworkStats implements AutoCloseable { class
71 private int mTag = android.net.NetworkStats.TAG_NONE;
88 private android.net.NetworkStats mSummary = null;
103 private android.net.NetworkStats.Entry mRecycledSummaryEntry = null;
107 NetworkStats(Context context, NetworkTemplate template, int flags, long startTimestamp, in NetworkStats() method in NetworkStats
164 public static final int UID_ALL = android.net.NetworkStats.UID_ALL;
269 public static final int TAG_NONE = android.net.NetworkStats.TAG_NONE;
286 case STATE_ALL: return android.net.NetworkStats.SET_ALL; in convertSet()
287 case STATE_DEFAULT: return android.net.NetworkStats.SET_DEFAULT; in convertSet()
288 case STATE_FOREGROUND: return android.net.NetworkStats.SET_FOREGROUND; in convertSet()
[all …]
DNetworkStatsManager.java22 import static android.net.NetworkStats.METERED_YES;
34 import android.app.usage.NetworkStats.Bucket;
252 NetworkStats stats = in querySummaryForDevice()
253 new NetworkStats(mContext, template, mFlags, startTime, endTime, mService); in querySummaryForDevice()
352 NetworkStats stats; in querySummaryForUser()
353 stats = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService); in querySummaryForUser()
391 public NetworkStats querySummary(int networkType, @Nullable String subscriberId, long startTime, in querySummary()
424 public NetworkStats querySummary(@NonNull NetworkTemplate template, long startTime, in querySummary()
428 NetworkStats result = in querySummary()
429 new NetworkStats(mContext, template, mFlags, startTime, endTime, mService); in querySummary()
[all …]
/packages/modules/Connectivity/tests/common/java/android/net/netstats/
DNetworkStatsApiTest.kt19 import android.net.NetworkStats
20 import android.net.NetworkStats.DEFAULT_NETWORK_NO
21 import android.net.NetworkStats.DEFAULT_NETWORK_YES
22 import android.net.NetworkStats.Entry
23 import android.net.NetworkStats.IFACE_VT
24 import android.net.NetworkStats.METERED_NO
25 import android.net.NetworkStats.METERED_YES
26 import android.net.NetworkStats.ROAMING_NO
27 import android.net.NetworkStats.ROAMING_YES
28 import android.net.NetworkStats.SET_DEFAULT
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/testutils/
DNetworkStatsUtilsTest.kt19 import android.net.NetworkStats
20 import android.net.NetworkStats.DEFAULT_NETWORK_NO
21 import android.net.NetworkStats.METERED_NO
22 import android.net.NetworkStats.ROAMING_NO
23 import android.net.NetworkStats.SET_DEFAULT
24 import android.net.NetworkStats.TAG_NONE
48 NetworkStats.Entry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, in testOrderInsensitiveEquals()
50 NetworkStats.Entry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, in testOrderInsensitiveEquals()
54 val red = NetworkStats(TEST_START, 0) in testOrderInsensitiveEquals()
55 val blue = NetworkStats(TEST_START, 1) in testOrderInsensitiveEquals()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/datausage/
DAppDataUsagePreferenceControllerTest.java19 import static android.app.usage.NetworkStats.Bucket.UID_TETHERING;
28 import android.app.usage.NetworkStats;
94 private final Queue<NetworkStats.Bucket> mMockedBuckets = new LinkedBlockingQueue<>();
103 public void addBucket(NetworkStats.Bucket bucket) { in addBucket()
108 public boolean hasNextBucket(@NonNull NetworkStats unused) { in hasNextBucket()
113 public NetworkStats.Bucket getNextBucket(@NonNull NetworkStats unused) { in getNextBucket()
132 mPreferenceController.onDataLoaded(mock(NetworkStats.class), new int[0]); in onDataLoaded_statsSizeZero_hasNoPreference()
137 private NetworkStats.Bucket getMockBucket(int uid, long rxBytes, long txBytes) { in getMockBucket()
138 NetworkStats.Bucket ret = mock(NetworkStats.Bucket.class); in getMockBucket()
150 mPreferenceController.onDataLoaded(mock(NetworkStats.class), new int[0]); in onDataLoaded_statsLoaded_hasTwoPreference()
[all …]
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DNetworkStatsUtils.kt19 import android.net.NetworkStats in <lambda>()
24 leftStats: NetworkStats, in <lambda>()
25 rightStats: NetworkStats, in <lambda>()
41 val left = NetworkStats.Entry() in <lambda>()
42 val right = NetworkStats.Entry() in <lambda>()
64 expected: NetworkStats, in assertNetworkStatsEquals()
65 actual: NetworkStats, in assertNetworkStatsEquals()
76 fun assertParcelingIsLossless(stats: NetworkStats) { in assertParcelingIsLossless()
DTestableNetworkStatsProviderCbBinder.kt19 import android.net.NetworkStats
31 val ifaceStats: NetworkStats,
32 val uidStats: NetworkStats
43 override fun notifyStatsUpdated(token: Int, ifaceStats: NetworkStats, uidStats: NetworkStats) { in notifyStatsUpdated()
73 fun expectNotifyStatsUpdated(ifaceStats: NetworkStats, uidStats: NetworkStats) { in expectNotifyStatsUpdated()
/packages/modules/Connectivity/tests/unit/java/android/app/usage/
DNetworkStatsManagerTest.java21 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
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.SET_ALL;
26 import static android.net.NetworkStats.SET_DEFAULT;
27 import static android.net.NetworkStats.TAG_NONE;
48 import android.net.NetworkStats.Entry;
142 NetworkStats stats = mManager.queryDetails( in testQueryDetails()
145 NetworkStats.Bucket bucket = new NetworkStats.Bucket(); in testQueryDetails()
[all …]
/packages/modules/Connectivity/framework-t/src/android/net/
DNetworkStats.java64 public final class NetworkStats implements Parcelable, Iterable<NetworkStats.Entry> { class
534 public NetworkStats(long elapsedRealtime, int initialSize) { in NetworkStats() method in NetworkStats
559 public NetworkStats(Parcel parcel) { in NetworkStats() method in NetworkStats
600 public NetworkStats clone() { in clone()
601 final NetworkStats clone = new NetworkStats(elapsedRealtime, size); in clone()
602 NetworkStats.Entry entry = null; in clone()
632 public NetworkStats insertEntry( in insertEntry()
641 public NetworkStats insertEntry(String iface, int uid, int set, int tag, long rxBytes, in insertEntry()
650 public NetworkStats insertEntry(String iface, int uid, int set, int tag, int metered, in insertEntry()
663 public NetworkStats insertEntry(Entry entry) { in insertEntry()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DNetworkStatsManagerTest.java18 import static android.app.usage.NetworkStats.Bucket.DEFAULT_NETWORK_ALL;
19 import static android.app.usage.NetworkStats.Bucket.DEFAULT_NETWORK_NO;
20 import static android.app.usage.NetworkStats.Bucket.DEFAULT_NETWORK_YES;
21 import static android.app.usage.NetworkStats.Bucket.METERED_ALL;
22 import static android.app.usage.NetworkStats.Bucket.METERED_NO;
23 import static android.app.usage.NetworkStats.Bucket.METERED_YES;
24 import static android.app.usage.NetworkStats.Bucket.ROAMING_ALL;
25 import static android.app.usage.NetworkStats.Bucket.ROAMING_NO;
26 import static android.app.usage.NetworkStats.Bucket.ROAMING_YES;
27 import static android.app.usage.NetworkStats.Bucket.STATE_ALL;
[all …]
/packages/services/Car/service/src/com/android/car/telemetry/publisher/net/
DNetworkStatsWrapper.java21 import android.app.usage.NetworkStats;
28 private final NetworkStats mNetworkStats;
31 public NetworkStatsWrapper(@NonNull NetworkStats networkStats) { in NetworkStatsWrapper()
37 public NetworkStats.Bucket getNextBucket() { in getNextBucket()
42 NetworkStats.Bucket bucket = new NetworkStats.Bucket(); in getNextBucket()
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/
DAppsNetworkStatsManager.java21 import android.app.usage.NetworkStats;
51 void onDataLoaded(@Nullable NetworkStats stats, @Nullable int[] restrictedUids); in onDataLoaded()
100 private void onAppsNetworkStatsLoaded(NetworkStats stats, int[] restrictedUids) { in onAppsNetworkStatsLoaded()
109 private class AppsNetworkStatsResult implements LoaderManager.LoaderCallbacks<NetworkStats> {
111 public Loader<NetworkStats> onCreateLoader(int id, Bundle args) { in onCreateLoader()
116 public void onLoadFinished(Loader<NetworkStats> loader, NetworkStats data) { in onLoadFinished()
123 public void onLoaderReset(Loader<NetworkStats> loader) { in onLoaderReset()
/packages/modules/Connectivity/framework-t/hiddenapi/
Dhiddenapi-max-target-o-low-priority-tiramisu.txt1 Landroid/app/usage/NetworkStats$Bucket;->convertDefaultNetworkStatus(I)I
2 Landroid/app/usage/NetworkStats$Bucket;->convertMetered(I)I
3 Landroid/app/usage/NetworkStats$Bucket;->convertRoaming(I)I
4 Landroid/app/usage/NetworkStats$Bucket;->convertSet(I)I
5 Landroid/app/usage/NetworkStats$Bucket;->convertState(I)I
6 Landroid/app/usage/NetworkStats$Bucket;->convertTag(I)I
7 Landroid/app/usage/NetworkStats$Bucket;->convertUid(I)I
8 Landroid/app/usage/NetworkStats$Bucket;->mBeginTimeStamp:J
9 Landroid/app/usage/NetworkStats$Bucket;->mDefaultNetworkStatus:I
10 Landroid/app/usage/NetworkStats$Bucket;->mEndTimeStamp:J
[all …]
/packages/modules/Connectivity/Tethering/apex/hiddenapi/
Dhiddenapi-max-target-o-low-priority.txt951 Landroid/net/NetworkStats$Entry;-><init>(JJJJJ)V
952 Landroid/net/NetworkStats$Entry;-><init>(Ljava/lang/String;IIIIIIJJJJJ)V
953 Landroid/net/NetworkStats$Entry;-><init>(Ljava/lang/String;IIIJJJJJ)V
954 Landroid/net/NetworkStats$Entry;->add(Landroid/net/NetworkStats$Entry;)V
955 Landroid/net/NetworkStats$Entry;->defaultNetwork:I
956 Landroid/net/NetworkStats$Entry;->isEmpty()Z
957 Landroid/net/NetworkStats$Entry;->isNegative()Z
958 Landroid/net/NetworkStats$Entry;->metered:I
959 Landroid/net/NetworkStats$Entry;->operations:J
960 Landroid/net/NetworkStats$Entry;->roaming:I
[all …]

1234