0
0
mirror of https://github.com/schwabe/ics-openvpn.git synced 2024-09-20 20:03:13 +02:00

Fix test listener

--HG--
extra : rebase_source : ffea43c43f6ab736e94f11f64fadee8f277c0aa0
This commit is contained in:
Arne Schwabe 2014-11-28 22:05:28 +01:00
parent 32f18ee02f
commit 510461c2f5
2 changed files with 3 additions and 6 deletions

View File

@ -604,10 +604,9 @@ public class ConfigParser {
np.mAuthenticationType=VpnProfile.TYPE_USERPASS_KEYSTORE;
}
if(authuser.size()>1) {
// Set option value to password get to get cance to embed later.
// Set option value to password get to embed later.
np.mUsername=null;
np.mPassword=authuser.get(1);
useEmbbedUserAuth(np,authuser.get(1));
useEmbbedUserAuth(np, authuser.get(1));
}
}
@ -776,7 +775,7 @@ public class ConfigParser {
return isudp;
}
static public void useEmbbedUserAuth(VpnProfile np,String inlinedata)
static public void useEmbbedUserAuth(VpnProfile np, String inlinedata)
{
String data = VpnProfile.getEmbeddedContent(inlinedata);
String[] parts = data.split("\n");

View File

@ -628,10 +628,8 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
{
ConnectivityManager cm = (ConnectivityManager) getBaseContext().getSystemService(CONNECTIVITY_SERVICE);
NetworkRequest.Builder nrb = new NetworkRequest.Builder();
nrb.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN);
mLollipopDeviceStateListener = new LollipopDeviceStateListener();
cm.requestNetwork(nrb.build(), mLollipopDeviceStateListener);
cm.registerNetworkCallback(nrb.build(), mLollipopDeviceStateListener);
}