|
@@ -303,6 +303,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
|
|
|
double currentRxBytes = TrafficStats.getUidRxBytes(android.os.Process.myUid());
|
|
|
|
|
|
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);
|
|
|
|
|
|
double txBytes = currentTxBytes - lastTxBytes;
|
|
|
double rxBytes = currentRxBytes - lastRxBytes;
|
|
@@ -391,6 +392,11 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
|
|
|
|
|
|
}
|
|
|
|
|
|
+ lastRxBytes = 0.0;
|
|
|
+ lastTxBytes = 0.0;
|
|
|
+ finalRxBytes = 0.0;
|
|
|
+ finalTxBytes = 0.0;
|
|
|
+
|
|
|
startTrafficMonitoring();
|
|
|
Date Today = Calendar.getInstance().getTime();
|
|
|
SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy");
|