Don't add the initial account setup flow fragment to the back stack
b/12669681 Change-Id: I39c969d0667c4a394b46adacf58ce02f99c8a52b
This commit is contained in:
parent
c73e92cd6d
commit
2ae3941a93
|
@ -85,7 +85,7 @@ public class AccountSetupFinal extends AccountSetupActivity implements View.OnCl
|
|||
// If we're not restoring from a previous state, we want to configure the initial screen
|
||||
mState = STATE_OPTIONS;
|
||||
updateHeadline();
|
||||
updateContentFragment();
|
||||
updateContentFragment(false /* addToBackstack */);
|
||||
}
|
||||
|
||||
UiUtilities.getView(this, R.id.previous).setOnClickListener(this);
|
||||
|
@ -125,7 +125,7 @@ public class AccountSetupFinal extends AccountSetupActivity implements View.OnCl
|
|||
* Swap in the new fragment according to mState. This pushes the current fragment onto the back
|
||||
* stack, so only call it once per transition.
|
||||
*/
|
||||
private void updateContentFragment() {
|
||||
private void updateContentFragment(boolean addToBackstack) {
|
||||
final Fragment f;
|
||||
switch (mState) {
|
||||
case STATE_OPTIONS:
|
||||
|
@ -139,7 +139,9 @@ public class AccountSetupFinal extends AccountSetupActivity implements View.OnCl
|
|||
}
|
||||
final FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.setup_fragment_container, f, CONTENT_FRAGMENT_TAG);
|
||||
ft.addToBackStack(null);
|
||||
if (addToBackstack) {
|
||||
ft.addToBackStack(null);
|
||||
}
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
|
@ -163,7 +165,7 @@ public class AccountSetupFinal extends AccountSetupActivity implements View.OnCl
|
|||
case STATE_OPTIONS:
|
||||
mState = STATE_NAMES;
|
||||
updateHeadline();
|
||||
updateContentFragment();
|
||||
updateContentFragment(true /* addToBackstack */);
|
||||
if (mSetupData.getFlowMode() == SetupDataFragment.FLOW_MODE_FORCE_CREATE) {
|
||||
getFragmentManager().executePendingTransactions();
|
||||
initiateAccountFinalize();
|
||||
|
|
Loading…
Reference in New Issue