Merge "Relaunch the account page after removing a work account" into tm-dev

This commit is contained in:
Jason Chiu
2022-04-25 08:28:43 +00:00
committed by Android (Google) Code Review

View File

@@ -623,6 +623,12 @@ public class AccountPreferenceController extends AbstractPreferenceController
if (action.equals(Intent.ACTION_MANAGED_PROFILE_REMOVED) if (action.equals(Intent.ACTION_MANAGED_PROFILE_REMOVED)
|| action.equals(Intent.ACTION_MANAGED_PROFILE_ADDED)) { || action.equals(Intent.ACTION_MANAGED_PROFILE_ADDED)) {
if (mFragment instanceof AccountWorkProfileDashboardFragment) { if (mFragment instanceof AccountWorkProfileDashboardFragment) {
new SubSettingLauncher(context)
.setDestination(AccountDashboardFragment.class.getName())
.setSourceMetricsCategory(mFragment.getMetricsCategory())
.setTitleRes(-1)
.setIsSecondLayerPage(true)
.launch();
mFragment.getActivity().finish(); mFragment.getActivity().finish();
} else { } else {
// Clean old state // Clean old state