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.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user