From b975c0e44445f76d67e7576c1e8e08609b696408 Mon Sep 17 00:00:00 2001 From: Nikolas Bravo Date: Mon, 10 Jul 2017 12:06:34 +0100 Subject: [PATCH] ProfileSelectDialog no longer removes caller activity from task. In Settings, after calling ProfileSelectDialog and choosing a profile, then going back would go 2 activities back. The issue is that ProfileSelectDialog was calling finish() in the no-longer-used SettingsDrawerActivity. This caused the any activity calling the dialog to be removed from the task, and thus being impossible to go back to. This call to the drawer is also a code smell. Bug: 36237246 Fixes: 36237246 Test: NA Change-Id: I6f309b220ffae1d86e6879ddf6a0305ad3dde3e8 --- .../src/com/android/settingslib/drawer/ProfileSelectDialog.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/ProfileSelectDialog.java b/packages/SettingsLib/src/com/android/settingslib/drawer/ProfileSelectDialog.java index 512049fc1eaf0..c79b1466d6067 100644 --- a/packages/SettingsLib/src/com/android/settingslib/drawer/ProfileSelectDialog.java +++ b/packages/SettingsLib/src/com/android/settingslib/drawer/ProfileSelectDialog.java @@ -68,10 +68,8 @@ public class ProfileSelectDialog extends DialogFragment implements OnClickListen public void onClick(DialogInterface dialog, int which) { UserHandle user = mSelectedTile.userHandle.get(which); // Show menu on top level items. - mSelectedTile.intent.putExtra(SettingsDrawerActivity.EXTRA_SHOW_MENU, true); mSelectedTile.intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); getActivity().startActivityAsUser(mSelectedTile.intent, user); - ((SettingsDrawerActivity) getActivity()).onProfileTileOpen(); } public static void updateUserHandlesIfNeeded(Context context, Tile tile) {