Merge "Properly clear "next" button de-bounce flags"
This commit is contained in:
commit
2428ea767e
|
@ -60,7 +60,7 @@ public abstract class AccountServerBaseFragment extends Fragment
|
||||||
// This is null in the setup wizard screens, and non-null in AccountSettings mode
|
// This is null in the setup wizard screens, and non-null in AccountSettings mode
|
||||||
public Button mProceedButton;
|
public Button mProceedButton;
|
||||||
// This is used to debounce multiple clicks on the proceed button (which does async work)
|
// 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";
|
/*package*/ String mBaseScheme = "protocol";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -130,8 +130,6 @@ public abstract class AccountServerBaseFragment extends Fragment
|
||||||
if (getArguments() != null) {
|
if (getArguments() != null) {
|
||||||
mSettingsMode = getArguments().getBoolean(BUNDLE_KEY_SETTINGS);
|
mSettingsMode = getArguments().getBoolean(BUNDLE_KEY_SETTINGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
mProceedButtonPressed = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -198,6 +196,7 @@ public abstract class AccountServerBaseFragment extends Fragment
|
||||||
if (mProceedButton != null) {
|
if (mProceedButton != null) {
|
||||||
mProceedButton.setEnabled(enable);
|
mProceedButton.setEnabled(enable);
|
||||||
}
|
}
|
||||||
|
clearButtonBounce();
|
||||||
|
|
||||||
// TODO: This supports the phone UX activities and will be removed
|
// TODO: This supports the phone UX activities and will be removed
|
||||||
mCallback.onEnableProceedButtons(enable);
|
mCallback.onEnableProceedButtons(enable);
|
||||||
|
@ -214,6 +213,13 @@ public abstract class AccountServerBaseFragment extends Fragment
|
||||||
new DuplicateCheckTask(accountId, checkHost, checkLogin, checkSettingsMode).execute();
|
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<Void, Void, Account> {
|
private class DuplicateCheckTask extends AsyncTask<Void, Void, Account> {
|
||||||
|
|
||||||
private final long mAccountId;
|
private final long mAccountId;
|
||||||
|
@ -249,7 +255,7 @@ public abstract class AccountServerBaseFragment extends Fragment
|
||||||
// Otherwise, proceed with the save/check
|
// Otherwise, proceed with the save/check
|
||||||
mCallback.onProceedNext(mCheckSettingsMode, fragment);
|
mCallback.onProceedNext(mCheckSettingsMode, fragment);
|
||||||
}
|
}
|
||||||
mProceedButtonPressed = false;
|
clearButtonBounce();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue