Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -29024,12 +29024,14 @@ package android.net { method public static long getMobileRxPackets(); method public static long getMobileTxBytes(); method public static long getMobileTxPackets(); method public static long getRxPackets(@NonNull String); method public static int getThreadStatsTag(); method public static int getThreadStatsUid(); method public static long getTotalRxBytes(); method public static long getTotalRxPackets(); method public static long getTotalTxBytes(); method public static long getTotalTxPackets(); method public static long getTxPackets(@NonNull String); method public static long getUidRxBytes(int); method public static long getUidRxPackets(int); method @Deprecated public static long getUidTcpRxBytes(int); core/java/android/net/TrafficStats.java +19 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.net; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.TestApi; Loading Loading @@ -595,8 +596,15 @@ public class TrafficStats { return total; } /** {@hide} */ public static long getTxPackets(String iface) { /** * Return the number of packets transmitted on the specified interface since * device boot. Statistics are measured at the network layer, so both TCP and * UDP usage are included. * * @param iface The name of the interface. * @return The number of transmitted packets. */ public static long getTxPackets(@NonNull String iface) { try { return getStatsService().getIfaceStats(iface, TYPE_TX_PACKETS); } catch (RemoteException e) { Loading @@ -604,8 +612,15 @@ public class TrafficStats { } } /** {@hide} */ public static long getRxPackets(String iface) { /** * Return the number of packets received on the specified interface since * device boot. Statistics are measured at the network layer, so both TCP * and UDP usage are included. * * @param iface The name of the interface. * @return The number of received packets. */ public static long getRxPackets(@NonNull String iface) { try { return getStatsService().getIfaceStats(iface, TYPE_RX_PACKETS); } catch (RemoteException e) { Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -29024,12 +29024,14 @@ package android.net { method public static long getMobileRxPackets(); method public static long getMobileTxBytes(); method public static long getMobileTxPackets(); method public static long getRxPackets(@NonNull String); method public static int getThreadStatsTag(); method public static int getThreadStatsUid(); method public static long getTotalRxBytes(); method public static long getTotalRxPackets(); method public static long getTotalTxBytes(); method public static long getTotalTxPackets(); method public static long getTxPackets(@NonNull String); method public static long getUidRxBytes(int); method public static long getUidRxPackets(int); method @Deprecated public static long getUidTcpRxBytes(int);
core/java/android/net/TrafficStats.java +19 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.net; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.TestApi; Loading Loading @@ -595,8 +596,15 @@ public class TrafficStats { return total; } /** {@hide} */ public static long getTxPackets(String iface) { /** * Return the number of packets transmitted on the specified interface since * device boot. Statistics are measured at the network layer, so both TCP and * UDP usage are included. * * @param iface The name of the interface. * @return The number of transmitted packets. */ public static long getTxPackets(@NonNull String iface) { try { return getStatsService().getIfaceStats(iface, TYPE_TX_PACKETS); } catch (RemoteException e) { Loading @@ -604,8 +612,15 @@ public class TrafficStats { } } /** {@hide} */ public static long getRxPackets(String iface) { /** * Return the number of packets received on the specified interface since * device boot. Statistics are measured at the network layer, so both TCP * and UDP usage are included. * * @param iface The name of the interface. * @return The number of received packets. */ public static long getRxPackets(@NonNull String iface) { try { return getStatsService().getIfaceStats(iface, TYPE_RX_PACKETS); } catch (RemoteException e) { Loading