diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-12-31 20:41:28 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-12-31 20:41:28 +0100 |
commit | d378e3b493737c5283b29e8c49d8c2b289c891fa (patch) | |
tree | 08f7a3b1a455015ec4f9e366e5e5a2ef8288dda8 /src/de/blinkt/openvpn/OpenVpnService.java | |
parent | bbbefe26e6c160bca867dce3188b3679f0fcf2fc (diff) |
Cleanups
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVpnService.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnService.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java index f4550c13..dff50e54 100644 --- a/src/de/blinkt/openvpn/OpenVpnService.java +++ b/src/de/blinkt/openvpn/OpenVpnService.java @@ -94,7 +94,7 @@ public class OpenVpnService extends VpnService implements StateListener { int icon = R.drawable.ic_stat_vpn; android.app.Notification.Builder nbuilder = new Notification.Builder(this); - nbuilder.setContentTitle("OpenVPN - " + mProfile.mName); + nbuilder.setContentTitle(getString(R.string.notifcation_title,mProfile.mName)); nbuilder.setContentText(msg); nbuilder.setOnlyAlertOnce(true); nbuilder.setOngoing(true); @@ -124,9 +124,9 @@ public class OpenVpnService extends VpnService implements StateListener { Method setpriority = nbuilder.getClass().getMethod("setPriority", int.class); // PRIORITY_MIN == -2 setpriority.invoke(nbuilder, -2 ); - -/* PendingIntent cancelconnet=null; - + + /* PendingIntent cancelconnet=null; + nbuilder.addAction(android.R.drawable.ic_menu_close_clear_cancel, getString(R.string.cancel_connection),cancelconnet); */ } @@ -325,10 +325,11 @@ public class OpenVpnService extends VpnService implements StateListener { bconfig[5] = getString(R.string.routes_info6, joinString(mRoutesv6)); String session = mProfile.mName; - if(mLocalIP!=null) - session+= " - " + mLocalIP; - if(mLocalIPv6!=null) - session+= " - " + mLocalIPv6; + if(mLocalIP!=null && mLocalIPv6!=null) + session = getString(R.string.session_ipv6string,session, mLocalIP, mLocalIPv6); + else if (mLocalIP !=null) + session= getString(R.string.session_ipv4string, session, mLocalIP); + builder.setSession(session); |