fix upstream NPE crash in UserAspectRatioDetails.launchApplication()

This commit is contained in:
Dmitry Muhomor
2025-07-30 21:11:00 +03:00
committed by Joey
parent a65bdfbe44
commit 71476359e9

View File

@@ -159,9 +159,9 @@ public class UserAspectRatioDetails extends AppInfoBase implements
} }
private void launchApplication() { private void launchApplication() {
Intent launchIntent = mPm.getLaunchIntentForPackage(mPackageName) Intent launchIntent = mPm.getLaunchIntentForPackage(mPackageName);
.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP);
if (launchIntent != null) { if (launchIntent != null) {
launchIntent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP);
getContext().startActivityAsUser(launchIntent, new UserHandle(mUserId)); getContext().startActivityAsUser(launchIntent, new UserHandle(mUserId));
} }
} }