android: Don't show the password dialog if not required

This commit is contained in:
Tobias Brunner
2012-08-31 18:24:46 +02:00
parent 69f731a9d8
commit 38e866c3dd
@@ -143,7 +143,8 @@ public class MainActivity extends Activity implements OnVpnProfileSelectedListen
Bundle profileInfo = new Bundle();
profileInfo.putLong(VpnProfileDataSource.KEY_ID, profile.getId());
profileInfo.putString(VpnProfileDataSource.KEY_USERNAME, profile.getUsername());
if (profile.getPassword() == null)
if (profile.getVpnType().getRequiresUsernamePassword() &&
profile.getPassword() == null)
{
LoginDialog login = new LoginDialog();
login.setArguments(profileInfo);