diff --git a/src/com/android/email/activity/setup/AccountServerBaseFragment.java b/src/com/android/email/activity/setup/AccountServerBaseFragment.java index 0909457fd..3385d16af 100644 --- a/src/com/android/email/activity/setup/AccountServerBaseFragment.java +++ b/src/com/android/email/activity/setup/AccountServerBaseFragment.java @@ -60,7 +60,7 @@ public abstract class AccountServerBaseFragment extends Fragment // This is null in the setup wizard screens, and non-null in AccountSettings mode public Button mProceedButton; // This is used to debounce multiple clicks on the proceed button (which does async work) - public boolean mProceedButtonPressed; + private boolean mProceedButtonPressed; /*package*/ String mBaseScheme = "protocol"; /** @@ -130,8 +130,6 @@ public abstract class AccountServerBaseFragment extends Fragment if (getArguments() != null) { mSettingsMode = getArguments().getBoolean(BUNDLE_KEY_SETTINGS); } - - mProceedButtonPressed = false; } /** @@ -198,6 +196,7 @@ public abstract class AccountServerBaseFragment extends Fragment if (mProceedButton != null) { mProceedButton.setEnabled(enable); } + clearButtonBounce(); // TODO: This supports the phone UX activities and will be removed mCallback.onEnableProceedButtons(enable); @@ -214,6 +213,13 @@ public abstract class AccountServerBaseFragment extends Fragment new DuplicateCheckTask(accountId, checkHost, checkLogin, checkSettingsMode).execute(); } + /** + * Clears the "next" button de-bounce flags and allows the "next" button to activate. + */ + private void clearButtonBounce() { + mProceedButtonPressed = false; + } + private class DuplicateCheckTask extends AsyncTask { private final long mAccountId; @@ -249,7 +255,7 @@ public abstract class AccountServerBaseFragment extends Fragment // Otherwise, proceed with the save/check mCallback.onProceedNext(mCheckSettingsMode, fragment); } - mProceedButtonPressed = false; + clearButtonBounce(); } }