diff options
author | Arne Schwabe <arne@rfc2549.org> | 2014-11-05 11:31:26 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2014-11-05 11:31:26 +0100 |
commit | 0b63f8d6a3d662be4c88c9d04740da3e8f1816e6 (patch) | |
tree | 79f19efd0d41bc6e225a63514ede2d58d8fb1fd3 /remoteExample | |
parent | 77d86701ef8e2c018e627fd2eb6f9abe73026940 (diff) |
Fix starting VPN without permission when called from external servicev0.6.20
Diffstat (limited to 'remoteExample')
-rw-r--r-- | remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java index 2ea37861..0bb634aa 100644 --- a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java +++ b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java @@ -168,10 +168,13 @@ public class MainFragment extends Fragment implements View.OnClickListener, Hand try { List<APIVpnProfile> list = mService.getProfiles(); String all="List:"; - for(APIVpnProfile vp:list) { + for(APIVpnProfile vp:list.subList(0, Math.min(5, list.size()))) { all = all + vp.mName + ":" + vp.mUUID + "\n"; } + if (list.size() > 5) + all +="\n And some profiles...."; + if(list.size()> 0) { Button b= mStartVpn; b.setOnClickListener(this); |