diff options
author | Arne Schwabe <arne@rfc2549.org> | 2014-02-18 22:28:49 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2014-02-18 22:28:49 +0100 |
commit | 1b9a8b81428a8d9fc20da93d0e01c8bf8f674a03 (patch) | |
tree | 78fd7b15647bc1d39675a823aa9dd718fac9f318 /main/src | |
parent | c5ed8dea40bdcd3ca89093227ac43f60d1e333a8 (diff) |
Fix not using low priority on CONNECTED state
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java | 2 | ||||
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java index 08d28ca1..1937ffc0 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java @@ -429,7 +429,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { return false;
}
- ParcelFileDescriptor pfd = mOpenVPNService.openTun();
+ ParcelFileDescriptor pfd = mOpenVPNService.openTun();
if(pfd==null)
return false;
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java index 1e9e14f1..0de791d6 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java @@ -638,6 +638,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac if (mProcessThread == null && !mNotificationAlwaysVisible) return; + boolean lowpriority = false; // Display byte count only after being connected { @@ -648,6 +649,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac } else if (level == LEVEL_CONNECTED) { mDisplayBytecount = true; mConnecttime = System.currentTimeMillis(); + lowpriority = true; } else { mDisplayBytecount = false; } @@ -655,8 +657,10 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac // Other notifications are shown, // This also mean we are no longer connected, ignore bytecount messages until next // CONNECTED - String ticker = getString(resid); - showNotification(getString(resid) + " " + logmessage, ticker, false, 0, level); + // Does not work :( + String msg = getString(resid); + String ticker = msg; + showNotification(msg + " " + logmessage, ticker, lowpriority , 0, level); } } |