Launch the correct profile for the App Info items

Use the app user handle when SubSettingLauncher launch the new page, to
make sure the new page is opened for the correct profile.

Bug: 236346018
Test: Unit test
Test: Manually with App Info Setting page
Change-Id: Idd6eb183e967b1ced10fcf46b9e74bdff3953280
This commit is contained in:
Chaohui Wang
2023-01-29 01:10:47 +08:00
parent 1e45ac1330
commit c1726d07e5
3 changed files with 10 additions and 1 deletions

View File

@@ -650,6 +650,7 @@ public class AppInfoDashboardFragment extends DashboardFragment
new SubSettingLauncher(context)
.setDestination(destination.getName())
.setArguments(args)
.setUserHandle(UserHandle.getUserHandleForUid(app.uid))
.setSourceMetricsCategory(sourceMetricsCategory)
.launch();
}