mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-06 00:00:47 -04:00
android: Pass UUID to VPN service to initiate profiles
This commit is contained in:
parent
163f752022
commit
6f9b96acb4
@ -160,7 +160,7 @@ public class CharonVpnService extends VpnService implements Runnable, VpnStateSe
|
||||
Bundle bundle = intent.getExtras();
|
||||
if (bundle != null)
|
||||
{
|
||||
profile = mDataSource.getVpnProfile(bundle.getLong(VpnProfileDataSource.KEY_ID));
|
||||
profile = mDataSource.getVpnProfile(bundle.getString(VpnProfileDataSource.KEY_UUID));
|
||||
if (profile != null)
|
||||
{
|
||||
String password = bundle.getString(VpnProfileDataSource.KEY_PASSWORD);
|
||||
|
@ -289,7 +289,7 @@ public class VpnStateService extends Service
|
||||
if (profileInfo == null)
|
||||
{
|
||||
profileInfo = new Bundle();
|
||||
profileInfo.putLong(VpnProfileDataSource.KEY_ID, mProfile.getId());
|
||||
profileInfo.putString(VpnProfileDataSource.KEY_UUID, mProfile.getUUID().toString());
|
||||
/* pass the previous password along */
|
||||
profileInfo.putString(VpnProfileDataSource.KEY_PASSWORD, mProfile.getPassword());
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ public class VpnProfileControlActivity extends AppCompatActivity
|
||||
public void startVpnProfile(VpnProfile profile)
|
||||
{
|
||||
Bundle profileInfo = new Bundle();
|
||||
profileInfo.putLong(VpnProfileDataSource.KEY_ID, profile.getId());
|
||||
profileInfo.putString(VpnProfileDataSource.KEY_UUID, profile.getUUID().toString());
|
||||
profileInfo.putString(VpnProfileDataSource.KEY_USERNAME, profile.getUsername());
|
||||
profileInfo.putString(VpnProfileDataSource.KEY_PASSWORD, profile.getPassword());
|
||||
profileInfo.putBoolean(PROFILE_REQUIRES_PASSWORD, profile.getVpnType().has(VpnTypeFeature.USER_PASS));
|
||||
|
Loading…
x
Reference in New Issue
Block a user