add openvpn connection logic draft
This commit is contained in:
parent
c057786011
commit
1ceee8901e
6 changed files with 527 additions and 322 deletions
|
|
@ -6,14 +6,18 @@ package org.amnezia.vpn.qt
|
|||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
|
||||
class VPNPermissionHelper : android.net.VpnService() {
|
||||
|
||||
private val tag = "VPNPermissionHelper"
|
||||
/**
|
||||
* This small service does nothing else then checking if the vpn permission
|
||||
* is present and prompting if not.
|
||||
*/
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
val intent = prepare(this.applicationContext)
|
||||
Log.i(tag, "VPNPermissionHelper onStartCommand")
|
||||
if (intent != null) {
|
||||
startActivityForResult(intent)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue