Deep copy the existing Arguments
Otherwise we end up using the same bundle for all the fragments. Bug: 304697867 Test: manual Test: atest ProfileSelectFragmentTest Change-Id: Ia31f2440516783c22849593922467756c8c54cb9
This commit is contained in:
@@ -323,7 +323,7 @@ public abstract class ProfileSelectFragment extends DashboardFragment {
|
||||
fragments.add(personalFragment);
|
||||
|
||||
if (managedProfileInfoProvider.getManagedProfile(context) != null) {
|
||||
final Bundle workOnly = bundle != null ? bundle : new Bundle();
|
||||
final Bundle workOnly = bundle != null ? bundle.deepCopy() : new Bundle();
|
||||
workOnly.putInt(EXTRA_PROFILE, ProfileType.WORK);
|
||||
final Fragment workFragment =
|
||||
workFragmentConstructor.constructAndGetFragment();
|
||||
@@ -333,7 +333,7 @@ public abstract class ProfileSelectFragment extends DashboardFragment {
|
||||
|
||||
if (Flags.allowPrivateProfile()
|
||||
&& !privateSpaceInfoProvider.isPrivateSpaceLocked(context)) {
|
||||
final Bundle privateOnly = bundle != null ? bundle : new Bundle();
|
||||
final Bundle privateOnly = bundle != null ? bundle.deepCopy() : new Bundle();
|
||||
privateOnly.putInt(EXTRA_PROFILE, ProfileType.PRIVATE);
|
||||
final Fragment privateFragment =
|
||||
privateFragmentConstructor.constructAndGetFragment();
|
||||
|
Reference in New Issue
Block a user