add null check to prevent NPE in logging app launch
Bug: 156458241 Test: manual Change-Id: I7327453233a1e22473967e7c0513b4e1fa282459
This commit is contained in:
parent
794ca4dba5
commit
44775ad756
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue