am 8d5f5cfd: am a97faa25: Discard result of Dupe Account check if paused

* commit '8d5f5cfd56a2d35da9d2000cd278c21bc73cccb6':
  Discard result of Dupe Account check if paused
This commit is contained in:
Andy Stadler 2011-01-26 08:34:01 -08:00 committed by Android Git Automerger
commit 4a3f86a820

View File

@ -117,6 +117,7 @@ public class AccountSetupBasics extends AccountSetupActivity
private Button mManualButton;
private Button mNextButton;
private boolean mNextButtonInhibit;
private boolean mPaused;
// Used when this Activity is called as part of account authentification flow,
// which requires to do extra work before and after the account creation.
@ -296,6 +297,18 @@ public class AccountSetupBasics extends AccountSetupActivity
Utility.runAsync(mOwnerLookupTask);
}
@Override
public void onPause() {
super.onPause();
mPaused = true;
}
@Override
public void onResume() {
super.onResume();
mPaused = false;
}
@Override
public void finish() {
if (mAccountAuthenticatorResponse != null) {
@ -477,6 +490,8 @@ public class AccountSetupBasics extends AccountSetupActivity
@Override
protected void onPostExecute(Account duplicateAccount) {
mNextButtonInhibit = false;
// Exit immediately if the user left before we finished
if (mPaused) return;
// Show duplicate account warning, or proceed
if (duplicateAccount != null) {
DuplicateAccountDialogFragment dialogFragment =