Fix crash on account creation

This commit is contained in:
Sam Whited 2014-11-07 22:48:17 -05:00
parent cc34c60255
commit 02db197a89
1 changed files with 2 additions and 13 deletions

View File

@ -232,18 +232,6 @@ public class EditAccountActivity extends XmppActivity {
}); });
} }
protected boolean inputDataDiffersFromAccount() {
if (mAccount == null) {
return true;
} else {
return (!mAccount.getJid().equals(mAccountJid.getText().toString()))
|| (!mAccount.getPassword().equals(
mPassword.getText().toString()) || mAccount
.isOptionSet(Account.OPTION_REGISTER) != mRegisterNew
.isChecked());
}
}
protected void updateSaveButton() { protected void updateSaveButton() {
if (mAccount != null if (mAccount != null
&& mAccount.getStatus() == Account.STATUS_CONNECTING) { && mAccount.getStatus() == Account.STATUS_CONNECTING) {
@ -348,7 +336,8 @@ public class EditAccountActivity extends XmppActivity {
if (getIntent() != null) { if (getIntent() != null) {
try { try {
this.jidToEdit = Jid.fromString(getIntent().getStringExtra("jid")); this.jidToEdit = Jid.fromString(getIntent().getStringExtra("jid"));
} catch (final InvalidJidException ignored) { } catch (final InvalidJidException | NullPointerException ignored) {
this.jidToEdit = null;
} }
if (this.jidToEdit != null) { if (this.jidToEdit != null) {
this.mRegisterNew.setVisibility(View.GONE); this.mRegisterNew.setVisibility(View.GONE);