From be39426d088e5ba2ccb410904aec066728321183 Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Fri, 22 Nov 2019 17:49:21 +0800 Subject: [PATCH] Fix navigation to wrong page - Copies fragment argument and pass it to child fragments Fixes: 144949171 Test: manual Change-Id: I301d84535d40ad711e0e64d260c3d0d3a98c0314 --- .../profileselector/ProfileSelectManageApplications.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/dashboard/profileselector/ProfileSelectManageApplications.java b/src/com/android/settings/dashboard/profileselector/ProfileSelectManageApplications.java index 8a9e4f8e037..a448f573b4a 100644 --- a/src/com/android/settings/dashboard/profileselector/ProfileSelectManageApplications.java +++ b/src/com/android/settings/dashboard/profileselector/ProfileSelectManageApplications.java @@ -29,12 +29,12 @@ public class ProfileSelectManageApplications extends ProfileSelectFragment { @Override public Fragment[] getFragments() { - final Bundle workOnly = new Bundle(); + final Bundle workOnly = getArguments() != null ? getArguments().deepCopy() : new Bundle(); workOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.WORK); final Fragment workFragment = new ManageApplications(); workFragment.setArguments(workOnly); - final Bundle personalOnly = new Bundle(); + final Bundle personalOnly = getArguments() != null ? getArguments() : new Bundle(); personalOnly.putInt(EXTRA_PROFILE, ProfileSelectFragment.PERSONAL); final Fragment personalFragment = new ManageApplications(); personalFragment.setArguments(personalOnly);