我的应用正在尝试计算通过WiFi/LAN和移动数据连接发送和接收的字节数。为此,我在某个时间点获取了TrafficStats计数器的值,并在下次检查时从其值中减去该值。//getcurrentvaluesofcounterslongcurrentMobileTxBytes=TrafficStats.getMobileTxBytes();longcurrentMobileRxBytes=TrafficStats.getMobileRxBytes();longtotalTxBytes=TrafficStats.getTotalTxBytes();longtotalRxBytes=Traff