android: Don't show the password dialog if not required
This commit is contained in:
@@ -143,7 +143,8 @@ public class MainActivity extends Activity implements OnVpnProfileSelectedListen
|
|||||||
Bundle profileInfo = new Bundle();
|
Bundle profileInfo = new Bundle();
|
||||||
profileInfo.putLong(VpnProfileDataSource.KEY_ID, profile.getId());
|
profileInfo.putLong(VpnProfileDataSource.KEY_ID, profile.getId());
|
||||||
profileInfo.putString(VpnProfileDataSource.KEY_USERNAME, profile.getUsername());
|
profileInfo.putString(VpnProfileDataSource.KEY_USERNAME, profile.getUsername());
|
||||||
if (profile.getPassword() == null)
|
if (profile.getVpnType().getRequiresUsernamePassword() &&
|
||||||
|
profile.getPassword() == null)
|
||||||
{
|
{
|
||||||
LoginDialog login = new LoginDialog();
|
LoginDialog login = new LoginDialog();
|
||||||
login.setArguments(profileInfo);
|
login.setArguments(profileInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user