Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44775ad7 authored by Pinyao Ting's avatar Pinyao Ting
Browse files

add null check to prevent NPE in logging app launch

Bug: 156458241
Test: manual
Change-Id: I7327453233a1e22473967e7c0513b4e1fa282459
parent 794ca4db
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -145,7 +145,9 @@ public class UserEventDispatcher implements ResourceBasedOverride {
        LauncherEvent event = newLauncherEvent(action,  targets);
        ItemInfo info = v == null ? null : (ItemInfo) v.getTag();
        if (info != null && Utilities.IS_DEBUG_DEVICE && FeatureFlags.ENABLE_HYBRID_HOTSEAT.get()) {
            FileLog.d(TAG, "appLaunch: packageName:" + info.getTargetComponent().getPackageName()
            final String pkg = info.getTargetComponent() != null
                    ? info.getTargetComponent().getPackageName() : "unknown";
            FileLog.d(TAG, "appLaunch: packageName:" + pkg
                    + ",isWorkApp:" + (info.user != null && !Process.myUserHandle().equals(
                    userHandle)) + ",launchLocation:" + info.container);
        }