diff --git a/src/com/android/email/activity/setup/AccountSetupExchange.java b/src/com/android/email/activity/setup/AccountSetupExchange.java index bafca3571..c8c2e9041 100644 --- a/src/com/android/email/activity/setup/AccountSetupExchange.java +++ b/src/com/android/email/activity/setup/AccountSetupExchange.java @@ -267,10 +267,13 @@ public class AccountSetupExchange extends Activity implements OnClickListener, public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK) { if (Intent.ACTION_EDIT.equals(getIntent().getAction())) { - // TODO Review carefully to make sure this is bulletproof if (mAccount.isSaved()) { + // Account.update will NOT save the HostAuth's mAccount.update(this, mAccount.toContentValues()); + mAccount.mHostAuthRecv.update(this, mAccount.mHostAuthRecv.toContentValues()); + mAccount.mHostAuthSend.update(this, mAccount.mHostAuthSend.toContentValues()); } else { + // Account.save will save the HostAuth's mAccount.save(this); } finish(); diff --git a/src/com/android/email/activity/setup/AccountSetupIncoming.java b/src/com/android/email/activity/setup/AccountSetupIncoming.java index 24ae3e667..2dbd803f8 100644 --- a/src/com/android/email/activity/setup/AccountSetupIncoming.java +++ b/src/com/android/email/activity/setup/AccountSetupIncoming.java @@ -325,9 +325,9 @@ public class AccountSetupIncoming extends Activity implements OnClickListener { public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK) { if (Intent.ACTION_EDIT.equals(getIntent().getAction())) { - // TODO Review carefully to make sure this is bulletproof if (mAccount.isSaved()) { mAccount.update(this, mAccount.toContentValues()); + mAccount.mHostAuthRecv.update(this, mAccount.mHostAuthRecv.toContentValues()); } else { mAccount.save(this); } diff --git a/src/com/android/email/activity/setup/AccountSetupOutgoing.java b/src/com/android/email/activity/setup/AccountSetupOutgoing.java index 510fbaf7a..557fa1d0a 100644 --- a/src/com/android/email/activity/setup/AccountSetupOutgoing.java +++ b/src/com/android/email/activity/setup/AccountSetupOutgoing.java @@ -245,10 +245,10 @@ public class AccountSetupOutgoing extends Activity implements OnClickListener, public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK) { if (Intent.ACTION_EDIT.equals(getIntent().getAction())) { - // TODO Review carefully to make sure this is bulletproof if (mAccount.isSaved()) { mAccount.update(this, mAccount.toContentValues()); - } else { + mAccount.mHostAuthSend.update(this, mAccount.mHostAuthSend.toContentValues()); + } else { mAccount.save(this); } finish();