summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/core
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-10-13 17:53:59 +0200
committerArne Schwabe <arne@rfc2549.org>2013-10-13 17:53:59 +0200
commit1295b8f844f914feeeef245229ca166b93ca37cd (patch)
tree508dfed686b140da66893b509a94615b53bd150f /src/de/blinkt/openvpn/core
parentd2dc6fa6fc12ca876bb3dcf099ec6694dc7ef061 (diff)
Working LogFragment
--HG-- rename : res/layout-w720dp/logwindow.xml => res/layout-w720dp/log_fragment.xml rename : res/layout/logwindow.xml => res/layout/log_fragment.xml rename : src/de/blinkt/openvpn/LogWindow.java => src/de/blinkt/openvpn/fragments/LogFragment.java
Diffstat (limited to 'src/de/blinkt/openvpn/core')
-rw-r--r--src/de/blinkt/openvpn/core/DeviceStateReceiver.java4
-rw-r--r--src/de/blinkt/openvpn/core/OpenVpnService.java6
-rw-r--r--src/de/blinkt/openvpn/core/VpnStatus.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/core/DeviceStateReceiver.java b/src/de/blinkt/openvpn/core/DeviceStateReceiver.java
index 8a148e10..250edf42 100644
--- a/src/de/blinkt/openvpn/core/DeviceStateReceiver.java
+++ b/src/de/blinkt/openvpn/core/DeviceStateReceiver.java
@@ -50,11 +50,11 @@ public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountL
LinkedList<Datapoint> trafficdata = new LinkedList<DeviceStateReceiver.Datapoint>();
@Override
- public void updateByteCount(long in, long out, long diffin, long diffout) {
+ public void updateByteCount(long in, long out, long diffIn, long diffOut) {
if (screen != connectState.PENDINGDISCONNECT)
return;
- long total = diffin + diffout;
+ long total = diffIn + diffOut;
trafficdata.add(new Datapoint(System.currentTimeMillis(), total));
while (trafficdata.getFirst().timestamp <= (System.currentTimeMillis() - TRAFFIC_WINDOW * 1000)) {
diff --git a/src/de/blinkt/openvpn/core/OpenVpnService.java b/src/de/blinkt/openvpn/core/OpenVpnService.java
index 0e48d4d6..b24bfc34 100644
--- a/src/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/src/de/blinkt/openvpn/core/OpenVpnService.java
@@ -593,13 +593,13 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
}
@Override
- public void updateByteCount(long in, long out, long diffin, long diffout) {
+ public void updateByteCount(long in, long out, long diffIn, long diffOut) {
if (mDisplayBytecount) {
String netstat = String.format(getString(R.string.statusline_bytecount),
humanReadableByteCount(in, false),
- humanReadableByteCount(diffin / OpenVPNManagement.mBytecountInterval, true),
+ humanReadableByteCount(diffIn / OpenVPNManagement.mBytecountInterval, true),
humanReadableByteCount(out, false),
- humanReadableByteCount(diffout / OpenVPNManagement.mBytecountInterval, true));
+ humanReadableByteCount(diffOut / OpenVPNManagement.mBytecountInterval, true));
boolean lowpriority = !mNotificationAlwaysVisible;
showNotification(netstat, null, lowpriority, mConnecttime, LEVEL_CONNECTED);
diff --git a/src/de/blinkt/openvpn/core/VpnStatus.java b/src/de/blinkt/openvpn/core/VpnStatus.java
index 002b6fc9..d6a86246 100644
--- a/src/de/blinkt/openvpn/core/VpnStatus.java
+++ b/src/de/blinkt/openvpn/core/VpnStatus.java
@@ -282,7 +282,7 @@ public class VpnStatus {
}
public interface ByteCountListener {
- void updateByteCount(long in, long out, long diffin, long diffout);
+ void updateByteCount(long in, long out, long diffIn, long diffOut);
}
public synchronized static void logMessage(LogLevel level,String prefix, String message)