Fix navigation to wrong page

- Copies fragment argument and pass it to child fragments

Fixes: 144949171
Test: manual
Change-Id: I301d84535d40ad711e0e64d260c3d0d3a98c0314
This commit is contained in:
Raff Tsai
2019-11-22 17:49:21 +08:00
parent 2037d57405
commit be39426d08

View File

@@ -29,12 +29,12 @@ public class ProfileSelectManageApplications extends ProfileSelectFragment {
@Override @Override
public Fragment[] getFragments() { public Fragment[] getFragments() {
final Bundle workOnly = new Bundle(); final Bundle workOnly = getArguments() != null ? getArguments().deepCopy() : new Bundle();
workOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.WORK); workOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.WORK);
final Fragment workFragment = new ManageApplications(); final Fragment workFragment = new ManageApplications();
workFragment.setArguments(workOnly); workFragment.setArguments(workOnly);
final Bundle personalOnly = new Bundle(); final Bundle personalOnly = getArguments() != null ? getArguments() : new Bundle();
personalOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.PERSONAL); personalOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.PERSONAL);
final Fragment personalFragment = new ManageApplications(); final Fragment personalFragment = new ManageApplications();
personalFragment.setArguments(personalOnly); personalFragment.setArguments(personalOnly);