gt: 		if (accountInfoEdited() && !mInitMode) {
context: package eu.siacs.conversations.ui;
  
  import android.app.AlertDialog;
  import android.app.AlertDialog.Builder;
  import android.app.PendingIntent;
  import android.content.DialogInterface;
  import android.content.Intent;
  import android.content.res.Configuration;
  import android.graphics.Bitmap;
  import android.os.Bundle;
  import android.security.KeyChain;
  import android.security.KeyChainAliasCallback;
  import android.text.Editable;
  import android.text.TextWatcher;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.AutoCompleteTextView;
  import android.widget.Button;
  import android.widget.CheckBox;
  import android.widget.CompoundButton;
  import android.widget.CompoundButton.OnCheckedChangeListener;
  import android.widget.EditText;
  import android.widget.ImageButton;
  import android.widget.ImageView;
  import android.widget.LinearLayout;
  import android.widget.RelativeLayout;
  import android.widget.TableLayout;
  import android.widget.TextView;
  import android.widget.Toast;
  import eu.siacs.conversations.Config;
  import org.whispersystems.libaxolotl.IdentityKey;
  import java.util.Set;
  import eu.siacs.conversations.Config;
  import eu.siacs.conversations.R;
  import eu.siacs.conversations.crypto.axolotl.AxolotlService;
  import eu.siacs.conversations.entities.Account;
  import eu.siacs.conversations.services.XmppConnectionService.OnCaptchaRequested;
  import eu.siacs.conversations.services.XmppConnectionService;
  import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate;
  import eu.siacs.conversations.ui.adapter.KnownHostsAdapter;
  import eu.siacs.conversations.utils.CryptoHelper;
  import eu.siacs.conversations.utils.UIHelper;
  import eu.siacs.conversations.xmpp.OnKeyStatusUpdated;
  import eu.siacs.conversations.xmpp.XmppConnection.Features;
  import eu.siacs.conversations.xmpp.forms.Data;
  import eu.siacs.conversations.xmpp.jid.InvalidJidException;
  import eu.siacs.conversations.xmpp.jid.Jid;
  import eu.siacs.conversations.xmpp.pep.Avatar;
  
  public class EditAccountActivity extends XmppActivity implements OnAccountUpdate,
  		OnKeyStatusUpdated, OnCaptchaRequested, KeyChainAliasCallback, XmppConnectionService.OnShowErrorToast {
  
  	private LinearLayout mMainLayout;
  	private AutoCompleteTextView mAccountJid;
  	private EditText mPassword;
  	private EditText mPasswordConfirm;
  	private CheckBox mRegisterNew;
  	private Button mCancelButton;
  	private Button mSaveButton;
  	private TableLayout mMoreTable;
  
  	private LinearLayout mStats;
  	private TextView mServerInfoSm;
  	private TextView mServerInfoRosterVersion;
  	private TextView mServerInfoCarbons;
  	private TextView mServerInfoMam;
  	private TextView mServerInfoCSI;
  	private TextView mServerInfoBlocking;
  	private TextView mServerInfoPep;
  	private TextView mServerInfoHttpUpload;
  	private TextView mSessionEst;
  	private TextView mOtrFingerprint;
  	private TextView mAxolotlFingerprint;
  	private TextView mAccountJidLabel;
  	private ImageView mAvatar;
  	private RelativeLayout mOtrFingerprintBox;
  	private RelativeLayout mAxolotlFingerprintBox;
  	private ImageButton mOtrFingerprintToClipboardButton;
  	private ImageButton mAxolotlFingerprintToClipboardButton;
  	private ImageButton mRegenerateAxolotlKeyButton;
  	private LinearLayout keys;
  	private LinearLayout keysCard;
  	private AlertDialog mCaptchaDialog = null;
  
  	private Jid jidToEdit;
  	private boolean mInitMode = false;
  	private Account mAccount;
  	private String messageFingerprint;
  
  	private boolean mFetchingAvatar = false;
  
  	private final OnClickListener mSaveButtonClickListener = new OnClickListener() {
  
  		@Override
  		public void onClick(final View v) {
  			if (mInitMode && mAccount != null) {
  				mAccount.setOption(Account.OPTION_DISABLED, false);
  			}
  			if (mAccount != null && mAccount.getStatus() == Account.State.DISABLED && !accountInfoEdited()) {
  				mAccount.setOption(Account.OPTION_DISABLED, false);
  				xmppConnectionService.updateAccount(mAccount);
  				return;
  			}
  			final boolean registerNewAccount = mRegisterNew.isChecked() && !Config.DISALLOW_REGISTRATION_IN_UI;
  			if (Config.DOMAIN_LOCK != null && mAccountJid.getText().toString().contains("@")) {
  				mAccountJid.setError(getString(R.string.invalid_username));
  				mAccountJid.requestFocus();
  				return;
  			}
  			final Jid jid;
  			try {
  				if (Config.DOMAIN_LOCK != null) {
  					jid = Jid.fromParts(mAccountJid.getText().toString(), Config.DOMAIN_LOCK, null);
  				} else {
  					jid = Jid.fromString(mAccountJid.getText().toString());
  				}
  			} catch (final InvalidJidException e) {
  				if (Config.DOMAIN_LOCK != null) {
  					mAccountJid.setError(getString(R.string.invalid_username));
  				} else {
  					mAccountJid.setError(getString(R.string.invalid_jid));
  				}
  				mAccountJid.requestFocus();
  				return;
  			}
  			if (jid.isDomainJid()) {
  				if (Config.DOMAIN_LOCK != null) {
  					mAccountJid.setError(getString(R.string.invalid_username));
  				} else {
  					mAccountJid.setError(getString(R.string.invalid_jid));
  				}
  				mAccountJid.requestFocus();
  				return;
  			}
  			final String password = mPassword.getText().toString();
  			final String passwordConfirm = mPasswordConfirm.getText().toString();
  			if (registerNewAccount) {
  				if (!password.equals(passwordConfirm)) {
  					mPasswordConfirm.setError(getString(R.string.passwords_do_not_match));
  					mPasswordConfirm.requestFocus();
  					return;
  				}
  			}
  			if (mAccount != null) {
  				mAccount.setJid(jid);
  				mAccountJid.setError(null);
  				mPasswordConfirm.setError(null);
  				mAccount.setPassword(password);
  				mAccount.setOption(Account.OPTION_REGISTER, registerNewAccount);
  				xmppConnectionService.updateAccount(mAccount);
  			} else {
  				if (xmppConnectionService.findAccountByJid(jid) != null) {
  					mAccountJid.setError(getString(R.string.account_already_exists));
  					mAccountJid.requestFocus();
  					return;
  				}
  				mAccount = new Account(jid.toBareJid(), password);
  				mAccount.setOption(Account.OPTION_USETLS, true);
  				mAccount.setOption(Account.OPTION_USECOMPRESSION, true);
  				mAccount.setOption(Account.OPTION_REGISTER, registerNewAccount);
  				xmppConnectionService.createAccount(mAccount);
  			}
  			if (!mAccount.isOptionSet(Account.OPTION_DISABLED)
  					&& !registerNewAccount
  					&& !mInitMode) {
  				finish();
  			} else {
  				updateSaveButton();
  				updateAccountInformation(true);
  			}
  
  		}
  	};
  	private final OnClickListener mCancelButtonClickListener = new OnClickListener() {
  
  		@Override
  		public void onClick(final View v) {
  			finish();
  		}
  	};
  
  	public void refreshUiReal() {
  		invalidateOptionsMenu();
  		if (mAccount != null
  				&& mAccount.getStatus() != Account.State.ONLINE
  				&& mFetchingAvatar) {
  			startActivity(new Intent(getApplicationContext(),
  					ManageAccountActivity.class));
  			finish();
  		} else if (mInitMode && mAccount != null && mAccount.getStatus() == Account.State.ONLINE) {
  			if (!mFetchingAvatar) {
  				mFetchingAvatar = true;
  				xmppConnectionService.checkForAvatar(mAccount, mAvatarFetchCallback);
  			}
  		} else {
  			updateSaveButton();
  		}
  		if (mAccount != null) {
  			updateAccountInformation(false);
  		}
  	}
  
  	@Override
  	public void onAccountUpdate() {
  		refreshUi();
  	}
  
  	private final UiCallback<Avatar> mAvatarFetchCallback = new UiCallback<Avatar>() {
  
  		@Override
  		public void userInputRequried(final PendingIntent pi, final Avatar avatar) {
  			finishInitialSetup(avatar);
  		}
  
  		@Override
  		public void success(final Avatar avatar) {
  			finishInitialSetup(avatar);
  		}
  
  		@Override
  		public void error(final int errorCode, final Avatar avatar) {
  			finishInitialSetup(avatar);
  		}
  	};
  	private final TextWatcher mTextWatcher = new TextWatcher() {
  
  		@Override
  		public void onTextChanged(final CharSequence s, final int start, final int before, final int count) {
  			updateSaveButton();
  		}
  
  		@Override
  		public void beforeTextChanged(final CharSequence s, final int start, final int count, final int after) {
  		}
  
  		@Override
  		public void afterTextChanged(final Editable s) {
  
  		}
  	};
  
  	private final OnClickListener mAvatarClickListener = new OnClickListener() {
  		@Override
  		public void onClick(final View view) {
  			if (mAccount != null) {
  				final Intent intent = new Intent(getApplicationContext(), PublishProfilePictureActivity.class);
  				intent.putExtra("account", mAccount.getJid().toBareJid().toString());
  				startActivity(intent);
  			}
  		}
  	};
  
  	protected void finishInitialSetup(final Avatar avatar) {
  		runOnUiThread(new Runnable() {
  
  			@Override
  			public void run() {
  				final Intent intent;
  				if (avatar != null) {
  					intent = new Intent(getApplicationContext(),
  							StartConversationActivity.class);
  					if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 1) {
  						intent.putExtra("init", true);
  					}
  				} else {
  					intent = new Intent(getApplicationContext(),
  							PublishProfilePictureActivity.class);
  					intent.putExtra("account", mAccount.getJid().toBareJid().toString());
  					intent.putExtra("setup", true);
  				}
  				startActivity(intent);
  				finish();
  			}
  		});
  	}
  
  	protected void updateSaveButton() {
  