diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-08-07 18:45:03 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-13 11:00:26 +0200 |
commit | 6e04147743d770909acf197401b25c875d7c20e5 (patch) | |
tree | 6104e49fa6dc76af2fb45284e9f8250bc414cf2e /src | |
parent | 8d4eea53250f3b6864b3c53187ebfe15ea695bd3 (diff) | |
download | strongswan-6e04147743d770909acf197401b25c875d7c20e5.tar.bz2 strongswan-6e04147743d770909acf197401b25c875d7c20e5.tar.xz |
Clone the current VPN profile before updating the password
Storing the password on the original object would be problematic in case
the user mistypes the password (no prompt would be shown the second time).
An alternative would be to just return the ID of the selected profile
and then fetch it from the database.
Diffstat (limited to 'src')
-rw-r--r-- | src/frontends/android/src/org/strongswan/android/ui/MainActivity.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/frontends/android/src/org/strongswan/android/ui/MainActivity.java b/src/frontends/android/src/org/strongswan/android/ui/MainActivity.java index 7387dab8d..50b2bfbe5 100644 --- a/src/frontends/android/src/org/strongswan/android/ui/MainActivity.java +++ b/src/frontends/android/src/org/strongswan/android/ui/MainActivity.java @@ -179,6 +179,8 @@ public class MainActivity extends Activity implements OnVpnProfileSelectedListen @Override public void onClick(DialogInterface dialog, int whichButton) { + /* let's work on a clone of the profile when updating the password */ + activeProfile = activeProfile.clone(); activeProfile.setPassword(password.getText().toString().trim()); prepareVpnService(); } |