Fix crash in CredentialsPreference

This commit is contained in:
Jakob Nixdorf 2018-01-04 12:34:59 +01:00
parent 5059abf2d0
commit a3a285bebc
No known key found for this signature in database
GPG key ID: BE99BF86574A7DBC

View file

@ -222,6 +222,7 @@ public class CredentialsPreference extends DialogPreference
if (value == AuthMethod.NONE) {
credentialsLayout.setVisibility(View.GONE);
if (getDialog() != null)
UIHelper.hideKeyboard(getContext(), getDialog().getCurrentFocus());
btnSave.setEnabled(true);
@ -260,6 +261,7 @@ public class CredentialsPreference extends DialogPreference
} else if (value == AuthMethod.DEVICE) {
credentialsLayout.setVisibility(View.GONE);
if (getDialog() != null)
UIHelper.hideKeyboard(getContext(), getDialog().getCurrentFocus());
btnSave.setEnabled(true);