Relaunch the account page after removing a work account
Removing a work account goes back the previous page. However, this closes Settings app in dual pane mode since the account page is in the 2nd layer. Bug: 223755141 Test: manual, robotest Change-Id: I40407cb052c0474f62254bcb2216e33496c901c8
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user