aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-08-07 18:45:03 +0200
committerTobias Brunner <tobias@strongswan.org>2012-08-13 11:00:26 +0200
commit6e04147743d770909acf197401b25c875d7c20e5 (patch)
tree6104e49fa6dc76af2fb45284e9f8250bc414cf2e /src
parent8d4eea53250f3b6864b3c53187ebfe15ea695bd3 (diff)
downloadstrongswan-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.java2
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();
}