diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-05-25 11:50:43 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-05-25 11:50:43 +0200 |
commit | 9ea8c8a18a4e02531df8acb87ad12a578805ee37 (patch) | |
tree | 581af0133c86940337508f28b20914d1626ded0a /src/de/blinkt/openvpn/api/ExternalOpenVPNService.java | |
parent | 12d79b76ed281887df1905b9183853ff06f1fab5 (diff) |
Extend external API documentation and change hasPermission to prepareVPNService
Diffstat (limited to 'src/de/blinkt/openvpn/api/ExternalOpenVPNService.java')
-rw-r--r-- | src/de/blinkt/openvpn/api/ExternalOpenVPNService.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java b/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java index 21580eb4..866fb698 100644 --- a/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java +++ b/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java @@ -177,10 +177,13 @@ public class ExternalOpenVPNService extends Service implements StateListener { }
@Override
- public boolean hasPermission() throws RemoteException {
+ public Intent prepareVPNService() throws RemoteException {
checkOpenVPNPermission();
- return VpnService.prepare(ExternalOpenVPNService.this)==null;
+ if(VpnService.prepare(ExternalOpenVPNService.this)==null)
+ return null;
+ else
+ return new Intent(getBaseContext(), GrantPermissionsActivity.class);
}
|