|
@@ -378,6 +378,12 @@ class VPNConnectionsUtil: VpnStatus.StateListener {
|
|
|
if (isUp) {
|
|
|
App.tunnelStatus = Tunnel.State.UP
|
|
|
homeViewModel.setConnectState(App.CONNECTED)
|
|
|
+
|
|
|
+ lastRxBytes = 0.0
|
|
|
+ lastTxBytes = 0.0
|
|
|
+ finalRxBytes = 0.0
|
|
|
+ finalTxBytes = 0.0
|
|
|
+
|
|
|
startTrafficMonitoring()
|
|
|
Log.d("test_wg", "tunnelStatus if = ${App.tunnelStatus}")
|
|
|
|
|
@@ -745,10 +751,8 @@ class VPNConnectionsUtil: VpnStatus.StateListener {
|
|
|
val currentTxBytes = TrafficStats.getUidTxBytes(Process.myUid()).toDouble()
|
|
|
val currentRxBytes = TrafficStats.getUidRxBytes(Process.myUid()).toDouble()
|
|
|
|
|
|
- Log.d(
|
|
|
- "test_network_stat_IKev2",
|
|
|
- "MVT: currentTxBytes = $currentTxBytes currentRxBytes = $currentRxBytes"
|
|
|
- )
|
|
|
+ Log.d("test_network_stat_IKev2", "MVT: currentTxBytes = $currentTxBytes currentRxBytes = $currentRxBytes")
|
|
|
+ Log.d("test_network_stat_semi", "lastTxBytes: $lastTxBytes lastRxBytes: $lastRxBytes finalTxBytes:$finalTxBytes finalRxBytes:$finalRxBytes")
|
|
|
|
|
|
val txBytes = currentTxBytes - lastTxBytes
|
|
|
val rxBytes = currentRxBytes - lastRxBytes
|