Home
last modified time | relevance | path

Searched refs:TrafficStats (Results 1 – 25 of 48) sorted by relevance

12

/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DTrafficStatsTest.java20 import android.net.TrafficStats;
52 assertTrue(TrafficStats.getMobileTxPackets() >= 0); in testValidMobileStats()
53 assertTrue(TrafficStats.getMobileRxPackets() >= 0); in testValidMobileStats()
54 assertTrue(TrafficStats.getMobileTxBytes() >= 0); in testValidMobileStats()
55 assertTrue(TrafficStats.getMobileRxBytes() >= 0); in testValidMobileStats()
59 assertTrue(TrafficStats.getTotalTxPackets() >= 0); in testValidTotalStats()
60 assertTrue(TrafficStats.getTotalRxPackets() >= 0); in testValidTotalStats()
61 assertTrue(TrafficStats.getTotalTxBytes() >= 0); in testValidTotalStats()
62 assertTrue(TrafficStats.getTotalRxBytes() >= 0); in testValidTotalStats()
66 assertTrue(TrafficStats.getTxPackets("lo") >= 0); in testValidIfaceStats()
[all …]
DNetworkStatsBinderTest.java28 import android.net.TrafficStats;
70 mUidStatsQueryOpArray.put(TYPE_RX_BYTES, uid -> TrafficStats.getUidRxBytes(uid)); in setUp()
71 mUidStatsQueryOpArray.put(TYPE_RX_PACKETS, uid -> TrafficStats.getUidRxPackets(uid)); in setUp()
72 mUidStatsQueryOpArray.put(TYPE_TX_BYTES, uid -> TrafficStats.getUidTxBytes(uid)); in setUp()
73 mUidStatsQueryOpArray.put(TYPE_TX_PACKETS, uid -> TrafficStats.getUidTxPackets(uid)); in setUp()
119 assertEquals(uidStatsFromBinder, TrafficStats.UNSUPPORTED); in testAccessUidStatsFromBinder()
DIpSecManagerTest.java74 import android.net.TrafficStats;
457 runAsShell(NETWORK_SETTINGS, () -> TrafficStats.clearRateLimitCaches());
459 uidTxDelta = TrafficStats.getUidTxPackets(Os.getuid()) - uidTxPackets;
460 uidRxDelta = TrafficStats.getUidRxPackets(Os.getuid()) - uidRxPackets;
485 long newUidTxBytes = TrafficStats.getUidTxBytes(Os.getuid());
486 long newUidRxBytes = TrafficStats.getUidRxBytes(Os.getuid());
487 long newUidTxPackets = TrafficStats.getUidTxPackets(Os.getuid());
488 long newUidRxPackets = TrafficStats.getUidRxPackets(Os.getuid());
503 long newIfaceTxBytes = TrafficStats.getLoopbackTxBytes();
504 long newIfaceRxBytes = TrafficStats.getLoopbackRxBytes();
[all …]
/packages/modules/Connectivity/tests/cts/netpermission/updatestatspermission/src/android/net/cts/network/permission/
DUpdateStatsPermissionTest.java26 import android.net.TrafficStats;
59 TrafficStats.setThreadStatsTag(0); in testUpdateDeviceStatsPermission()
60 TrafficStats.setThreadStatsUid(/*root uid*/ 0); in testUpdateDeviceStatsPermission()
62 TrafficStats.tagSocket(socket); in testUpdateDeviceStatsPermission()
72 final long uidTxBytesBefore = TrafficStats.getUidTxBytes(Process.myUid()); in testUpdateDeviceStatsPermission()
79 runAsShell(NETWORK_SETTINGS, () -> TrafficStats.clearRateLimitCaches()); in testUpdateDeviceStatsPermission()
81 long uidTxBytesAfter = TrafficStats.getUidTxBytes(Process.myUid()); in testUpdateDeviceStatsPermission()
99 assertEquals(UNSUPPORTED, TrafficStats.getUidRxBytes(/*root uid*/ 0)); in testGetStatsOfOtherUid()
/packages/modules/Connectivity/tests/integration/src/com/android/server/net/integrationtests/
DNetworkStatsIntegrationTest.kt37 import android.net.TrafficStats in <lambda>()
221 TrafficStats.clearRateLimitCaches() in <lambda>()
246 TrafficStats.clearRateLimitCaches() in <lambda>()
317 TrafficStats.setThreadStatsTag(tag) in <lambda>()
348 TrafficStats.clearThreadStatsTag() in <lambda>()
476 TrafficStats.getRxBytes(iface), in <lambda>()
477 TrafficStats.getRxPackets(iface), in <lambda>()
478 TrafficStats.getTxBytes(iface), in <lambda>()
479 TrafficStats.getTxPackets(iface) in <lambda>()
483 TrafficStats.getUidRxBytes(uid), in <lambda>()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DFrameworkFacade.java36 import android.net.TrafficStats;
235 return TrafficStats.getTxPackets(iface); in getTxPackets()
239 return TrafficStats.getRxPackets(iface); in getRxPackets()
243 return SdkLevel.isAtLeastS() ? TrafficStats.getTxBytes(iface) : 0; in getTxBytes()
247 return SdkLevel.isAtLeastS() ? TrafficStats.getRxBytes(iface) : 0; in getRxBytes()
328 return TrafficStats.getMobileTxBytes(); in getMobileTxBytes()
335 return TrafficStats.getMobileRxBytes(); in getMobileRxBytes()
342 return TrafficStats.getTotalTxBytes(); in getTotalTxBytes()
349 return TrafficStats.getTotalRxBytes(); in getTotalRxBytes()
/packages/modules/Connectivity/framework-t/hiddenapi/
Dhiddenapi-max-target-o-low-priority-tiramisu.txt483 Landroid/net/TrafficStats;->addIfSupported(J)J
484 Landroid/net/TrafficStats;->closeQuietly(Landroid/net/INetworkStatsSession;)V
485 Landroid/net/TrafficStats;->GB_IN_BYTES:J
486 Landroid/net/TrafficStats;->getDataLayerSnapshotForUid(Landroid/content/Context;)Landroid/net/Netwo…
487 Landroid/net/TrafficStats;->getRxPackets(Ljava/lang/String;)J
488 Landroid/net/TrafficStats;->getTxPackets(Ljava/lang/String;)J
489 Landroid/net/TrafficStats;->KB_IN_BYTES:J
490 Landroid/net/TrafficStats;->LOOPBACK_IFACE:Ljava/lang/String;
491 Landroid/net/TrafficStats;->MB_IN_BYTES:J
492 Landroid/net/TrafficStats;->PB_IN_BYTES:J
[all …]
/packages/apps/TV/common/src/com/android/tv/common/util/
DNetworkTrafficTags.java19 import android.net.TrafficStats;
49 TrafficStats.setThreadStatsTag(tag); in execute()
53 TrafficStats.clearThreadStatsTag(); in execute()
/packages/modules/Connectivity/Tethering/tests/mts/src/android/tethering/mts/
DSkDestroyListenerTest.java29 import android.net.TrafficStats;
89 TrafficStats.setThreadStatsTag(COOKIE_TAG); in doTestSkDestroyListener()
94 TrafficStats.clearThreadStatsTag(); in doTestSkDestroyListener()
/packages/apps/Dialer/java/com/android/incallui/calllocation/impl/
DReverseGeocodeTask.java20 import android.net.TrafficStats;
63 TrafficStats.setThreadStatsTag(TrafficStatsTags.REVERSE_GEOCODE_TAG); in doInBackground()
128 TrafficStats.clearThreadStatsTag(); in doInBackground()
/packages/modules/Connectivity/framework-t/src/android/app/usage/
DNetworkStats.java26 import android.net.TrafficStats;
169 public static final int UID_REMOVED = TrafficStats.UID_REMOVED;
174 public static final int UID_TETHERING = TrafficStats.UID_TETHERING;
304 case TrafficStats.UID_REMOVED: return UID_REMOVED; in convertUid()
305 case TrafficStats.UID_TETHERING: return UID_TETHERING; in convertUid()
/packages/modules/Connectivity/framework-t/api/
Dlint-baseline.txt72 StaticUtils: android.net.TrafficStats:
82 UseParcelFileDescriptor: android.net.TrafficStats#tagFileDescriptor(java.io.FileDescriptor) paramet…
83 …leDescriptor instead of FileDescriptor in parameter fd in android.net.TrafficStats.tagFileDescript…
84 UseParcelFileDescriptor: android.net.TrafficStats#untagFileDescriptor(java.io.FileDescriptor) param…
85 …leDescriptor instead of FileDescriptor in parameter fd in android.net.TrafficStats.untagFileDescri…
Dremoved.txt4 public class TrafficStats {
/packages/modules/Connectivity/service-t/src/com/android/server/
DNetworkStatsServiceInitializer.java20 import android.net.TrafficStats;
53 TrafficStats.init(getContext()); in onStart()
/packages/apps/TV/src/com/android/tv/util/images/
DBitmapUtils.java29 import android.net.TrafficStats;
118 final int oldTag = TrafficStats.getThreadStatsTag(); in decodeSampledBitmapFromUriString()
119 TrafficStats.setThreadStatsTag(NetworkTrafficTags.LOGO_FETCHER); in decodeSampledBitmapFromUriString()
173 TrafficStats.setThreadStatsTag(oldTag); in decodeSampledBitmapFromUriString()
/packages/modules/NetworkStack/src/com/android/networkstack/util/
DDnsUtils.java25 import android.net.TrafficStats;
128 final int oldTag = TrafficStats.getAndSetThreadStatsTag( in getAllByName()
139 TrafficStats.setThreadStatsTag(oldTag); in getAllByName()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/
DIkeUdp4Socket.java24 import android.net.TrafficStats;
71 TrafficStats.tagFileDescriptor(sock); in getInstance()
DIkeUdp6Socket.java24 import android.net.TrafficStats;
84 TrafficStats.tagFileDescriptor(sock); in openUdp6Sock()
/packages/apps/UniversalMediaPlayer/java/com/android/pump/util/
DHttp.java20 import android.net.TrafficStats;
124 final int oldTag = TrafficStats.getThreadStatsTag(); in getOrPost()
126 TrafficStats.setThreadStatsTag(TRAFFIC_STATS_TAG); in getOrPost()
146 TrafficStats.setThreadStatsTag(oldTag); in getOrPost()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadThread.java65 import android.net.TrafficStats;
298 TrafficStats.setThreadStatsTagDownload(); in run()
299 TrafficStats.setThreadStatsUid(mInfo.mUid); in run()
304 TrafficStats.incrementOperationCount(1); in run()
373 TrafficStats.clearThreadStatsTag(); in run()
374 TrafficStats.clearThreadStatsUid(); in run()
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/
DMailTransport.java20 import android.net.TrafficStats;
193 TrafficStats.setThreadStatsTag(TrafficStatsTags.VISUAL_VOICEMAIL_TAG); in createSocket()
199 TrafficStats.clearThreadStatsTag(); in createSocket()
/packages/modules/Connectivity/framework-t/src/android/net/
DNetworkStatsAccess.java21 import static android.net.TrafficStats.UID_REMOVED;
22 import static android.net.TrafficStats.UID_TETHERING;
/packages/modules/RemoteKeyProvisioning/app/src/com/android/rkpdapp/interfaces/
DServerInterface.java23 import android.net.TrafficStats;
411 final int oldTrafficTag = TrafficStats.getAndSetThreadStatsTag(operation.getTrafficTag()); in connectAndGetData()
455 TrafficStats.setThreadStatsTag(oldTrafficTag); in connectAndGetData()
/packages/modules/Connectivity/service-t/src/com/android/server/net/
DNetworkStatsRecorder.java20 import static android.net.TrafficStats.KB_IN_BYTES;
21 import static android.net.TrafficStats.MB_IN_BYTES;
33 import android.net.TrafficStats;
/packages/modules/Connectivity/Tethering/src/android/net/ip/
DRouterAdvertisementDaemon.java39 import android.net.TrafficStats;
505 final int oldTag = TrafficStats.getAndSetThreadStatsTag(TAG_SYSTEM_NEIGHBOR); in createSocket()
517 TrafficStats.setThreadStatsTag(oldTag); in createSocket()

12