am cdfffcf4: Merge "Don\'t re-add fragment if it\'s already been added" into ub-mail-algol

* commit 'cdfffcf4609336445cbaade49581d07ad10e7bf1':
  Don't re-add fragment if it's already been added
This commit is contained in:
Tony Mantler 2014-04-16 17:46:34 +00:00 committed by Android Git Automerger
commit 1b8cb007ba

View File

@ -32,13 +32,15 @@ public class AccountCredentials extends Activity
final String emailAddress = getIntent().getStringExtra(EXTRA_EMAIL);
final String protocol = getIntent().getStringExtra(EXTRA_PROTOCOL);
final AccountSetupCredentialsFragment f =
AccountSetupCredentialsFragment.newInstance(emailAddress, protocol,
null /* clientCert */, false /* passwordFailed */, true /* standalone */);
getFragmentManager().beginTransaction()
.add(R.id.account_credentials_fragment_container, f, CREDENTIALS_FRAGMENT_TAG)
.commit();
if (savedInstanceState == null) {
final AccountSetupCredentialsFragment f =
AccountSetupCredentialsFragment.newInstance(emailAddress, protocol,
null /* clientCert */, false /* passwordFailed */,
true /* standalone */);
getFragmentManager().beginTransaction()
.add(R.id.account_credentials_fragment_container, f, CREDENTIALS_FRAGMENT_TAG)
.commit();
}
// Assume canceled until we find out otherwise.
setResult(RESULT_CANCELED);
}