Fix focus on wrong tab

Fixes: 146594840
Test: Robolectric
Change-Id: I14c6d5a4055bee5d0aa413479fb9893e9dfc41df
This commit is contained in:
Raff Tsai
2019-12-20 12:04:42 +08:00
parent 4e561fb9cb
commit 91d9942494
3 changed files with 124 additions and 112 deletions

View File

@@ -150,7 +150,7 @@ public abstract class ProfileSelectFragment extends DashboardFragment {
if (bundle != null) {
final int extraTab = bundle.getInt(SettingsActivity.EXTRA_SHOW_FRAGMENT_TAB, -1);
if (extraTab != -1) {
return WORK_TAB;
return extraTab;
}
final int userId = bundle.getInt(EXTRA_USER_ID, UserHandle.SYSTEM.getIdentifier());
final boolean isWorkProfile = UserManager.get(activity).isManagedProfile(userId);