|
@@ -321,24 +321,24 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
|
|
|
|
|
|
if (finalTxBytes < 1000) {
|
|
if (finalTxBytes < 1000) {
|
|
StringUp2 = finalTxBytes;
|
|
StringUp2 = finalTxBytes;
|
|
- StringUpUnit = "Byte/s";
|
|
|
|
|
|
+ StringUpUnit = "Byte";
|
|
} else if ((finalTxBytes >= 1000) && (finalTxBytes <= 1000_000)) {
|
|
} else if ((finalTxBytes >= 1000) && (finalTxBytes <= 1000_000)) {
|
|
StringUp2 = finalTxBytes / 1000;
|
|
StringUp2 = finalTxBytes / 1000;
|
|
- StringUpUnit = "KB/S";
|
|
|
|
|
|
+ StringUpUnit = "KB";
|
|
} else {
|
|
} else {
|
|
StringUp2 = finalTxBytes / 1000_000;
|
|
StringUp2 = finalTxBytes / 1000_000;
|
|
- StringUpUnit = "MB/S";
|
|
|
|
|
|
+ StringUpUnit = "MB";
|
|
}
|
|
}
|
|
|
|
|
|
if (finalRxBytes < 1000) {
|
|
if (finalRxBytes < 1000) {
|
|
StringDown2 = finalRxBytes;
|
|
StringDown2 = finalRxBytes;
|
|
- StringDownUnit = "Byte/s";
|
|
|
|
|
|
+ StringDownUnit = "Byte";
|
|
} else if ((finalRxBytes >= 1000) && (finalRxBytes <= 1000_000)) {
|
|
} else if ((finalRxBytes >= 1000) && (finalRxBytes <= 1000_000)) {
|
|
StringDown2 = finalRxBytes / 1000;
|
|
StringDown2 = finalRxBytes / 1000;
|
|
- StringDownUnit = "KB/S";
|
|
|
|
|
|
+ StringDownUnit = "KB";
|
|
} else {
|
|
} else {
|
|
StringDown2 = finalRxBytes / 1000_000;
|
|
StringDown2 = finalRxBytes / 1000_000;
|
|
- StringDownUnit = "MB/S";
|
|
|
|
|
|
+ StringDownUnit = "MB";
|
|
}
|
|
}
|
|
|
|
|
|
Log.d("test_network_stat_final", "Down: " + StringDown2 + " Up: " + StringUp2);
|
|
Log.d("test_network_stat_final", "Down: " + StringDown2 + " Up: " + StringUp2);
|