Fix crash of starting private app info pages for LS

Setting homapage just can be started using the primary profile.

Fix: 336449492
Test: manual
Change-Id: Ic5f496b0ff660af7a0eb7162490a1b036ed6ef61
This commit is contained in:
Jason Chiu
2024-04-23 14:38:58 +08:00
parent 39e42bf97a
commit f9fabeae1c

View File

@@ -204,7 +204,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements
if (mIsEmbeddingActivityEnabled) {
final UserManager um = getSystemService(UserManager.class);
final UserInfo userInfo = um.getUserInfo(getUserId());
if (userInfo.isManagedProfile()) {
if (!userInfo.isMain()) {
final Intent intent = new Intent(getIntent())
.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT)
.putExtra(EXTRA_USER_HANDLE, getUser())