Fix the work profile's deep link problem

- Settings shows the work Homepage while starting the work profile's
  icon, which is not allowed.
- Clicking work apps' App info plays an unsmooth window transition
  animation.

Fix: 233296965
Test: manual, robotest
Change-Id: I3d12f6c59692c4a4cc718ea7022b60be50235abb
This commit is contained in:
Jason Chiu
2022-05-20 12:05:32 +08:00
parent 72642fa03d
commit 26588fc2e5
2 changed files with 22 additions and 8 deletions

View File

@@ -433,7 +433,8 @@ public class SettingsActivity extends SettingsBaseActivity
final UserManager um = getSystemService(UserManager.class);
final UserInfo userInfo = um.getUserInfo(getUser().getIdentifier());
if (userInfo.isManagedProfile()) {
trampolineIntent.putExtra(EXTRA_USER_HANDLE, getUser());
trampolineIntent.setClass(this, DeepLinkHomepageActivityInternal.class)
.putExtra(EXTRA_USER_HANDLE, getUser());
startActivityAsUser(trampolineIntent, um.getPrimaryUser().getUserHandle());
} else {
startActivity(trampolineIntent);