summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/layout/about.xml12
-rw-r--r--src/de/blinkt/openvpn/OpenVpnService.java10
2 files changed, 16 insertions, 6 deletions
diff --git a/res/layout/about.xml b/res/layout/about.xml
index 6766f687..e6abed96 100644
--- a/res/layout/about.xml
+++ b/res/layout/about.xml
@@ -15,7 +15,7 @@
<Space
android:layout_width="match_parent"
- android:layout_height="10sp" />
+ android:layout_height="12sp" />
<TextView
android:layout_width="match_parent"
@@ -25,7 +25,7 @@
<Space
android:layout_width="match_parent"
- android:layout_height="10sp" />
+ android:layout_height="12sp" />
<TextView
android:layout_width="match_parent"
@@ -35,7 +35,7 @@
<Space
android:layout_width="match_parent"
- android:layout_height="10sp" />
+ android:layout_height="12sp" />
<TextView
android:id="@+id/donatestring"
@@ -44,7 +44,7 @@
<Space
android:layout_width="match_parent"
- android:layout_height="10sp" />
+ android:layout_height="12sp" />
<TextView
android:id="@+id/translation"
@@ -54,7 +54,7 @@
<Space
android:layout_width="match_parent"
- android:layout_height="10sp" />
+ android:layout_height="12sp" />
<TextView
android:layout_width="match_parent"
@@ -63,7 +63,7 @@
<Space
android:layout_width="match_parent"
- android:layout_height="10sp" />
+ android:layout_height="12sp" />
<TextView
android:layout_width="match_parent"
diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java
index e580089f..9f6da4c3 100644
--- a/src/de/blinkt/openvpn/OpenVpnService.java
+++ b/src/de/blinkt/openvpn/OpenVpnService.java
@@ -20,6 +20,7 @@ import java.lang.reflect.Method;
import java.util.Locale;
import java.util.Vector;
+import android.Manifest.permission;
import android.annotation.TargetApi;
import android.app.Notification;
import android.app.NotificationManager;
@@ -542,6 +543,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
public void updateState(String state,String logmessage, int resid, ConnectionStatus level) {
// If the process is not running, ignore any state,
// Notification should be invisible in this state
+ doSendBroadcast(state, level);
if(mProcessThread==null && !mNotificationalwaysVisible)
return;
@@ -564,6 +566,14 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
}
}
+ private void doSendBroadcast(String state, ConnectionStatus level) {
+ Intent vpnstatus = new Intent();
+ vpnstatus.setAction("de.blinkt.openvpn.VPN_STATUS");
+ vpnstatus.putExtra("status", level.toString());
+ vpnstatus.putExtra("detailstatus", state);
+ sendBroadcast(vpnstatus, permission.ACCESS_NETWORK_STATE);
+ }
+
@Override
public void updateByteCount(long in, long out, long diffin, long diffout) {
if(mDisplayBytecount) {