Merge "Move account force-creation to onResume()" into ub-mail-master
This commit is contained in:
commit
231bd8a53c
|
@ -63,6 +63,7 @@ public class AccountSetupFinal extends AccountSetupActivity implements View.OnCl
|
||||||
private int mState = STATE_OPTIONS;
|
private int mState = STATE_OPTIONS;
|
||||||
|
|
||||||
private boolean mIsProcessing = false;
|
private boolean mIsProcessing = false;
|
||||||
|
private boolean mForceCreate = false;
|
||||||
|
|
||||||
private Button mNextButton;
|
private Button mNextButton;
|
||||||
|
|
||||||
|
@ -96,6 +97,17 @@ public class AccountSetupFinal extends AccountSetupActivity implements View.OnCl
|
||||||
&& mSetupData.getFlowMode() == SetupDataFragment.FLOW_MODE_FORCE_CREATE) {
|
&& mSetupData.getFlowMode() == SetupDataFragment.FLOW_MODE_FORCE_CREATE) {
|
||||||
// If we are just visiting here to fill in details, exit immediately
|
// If we are just visiting here to fill in details, exit immediately
|
||||||
getFragmentManager().executePendingTransactions();
|
getFragmentManager().executePendingTransactions();
|
||||||
|
mForceCreate = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (mForceCreate) {
|
||||||
|
mForceCreate = false;
|
||||||
|
// We need to do this after onCreate so that we can ensure that the fragment is fully
|
||||||
|
// created before querying it.
|
||||||
initiateAccountCreation();
|
initiateAccountCreation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue