Merge "simplify tcpTx/RxPackets" into main
diff --git a/framework-t/src/android/net/TrafficStats.java b/framework-t/src/android/net/TrafficStats.java
index dc4ac55..41cf63f 100644
--- a/framework-t/src/android/net/TrafficStats.java
+++ b/framework-t/src/android/net/TrafficStats.java
@@ -683,33 +683,13 @@
/** {@hide} */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static long getMobileTcpRxPackets() {
- long total = 0;
- for (String iface : getMobileIfaces()) {
- long stat = UNSUPPORTED;
- try {
- stat = getStatsService().getIfaceStats(iface, TYPE_TCP_RX_PACKETS);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- total += addIfSupported(stat);
- }
- return total;
+ return UNSUPPORTED;
}
/** {@hide} */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static long getMobileTcpTxPackets() {
- long total = 0;
- for (String iface : getMobileIfaces()) {
- long stat = UNSUPPORTED;
- try {
- stat = getStatsService().getIfaceStats(iface, TYPE_TCP_TX_PACKETS);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- total += addIfSupported(stat);
- }
- return total;
+ return UNSUPPORTED;
}
/**