Merge "Fix crash of starting private app info pages for LS" into main

This commit is contained in:
Manish Singh
2024-04-23 14:13:38 +00:00
committed by Android (Google) Code Review

View File

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