From c0bb7ecc72c2809b80a560e37ff367b9c8b07327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Kvist?= <hakan.kvist@sony.com> Date: Fri, 12 Nov 2021 13:51:37 +0100 Subject: [PATCH] Add null check after getApplicationInfo in InstantAppNotifier getApplicationInfo can return null, so check return value before access. Fixes: 206007136 Test: N/A Change-Id: Iaab7ba41f46b2d6caa7d43add4689228230d5901 --- .../systemui/statusbar/notification/InstantAppNotifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java index e58ea7b8b5f3..eddc347dad45 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java @@ -234,7 +234,7 @@ public class InstantAppNotifier extends SystemUI ApplicationInfo appInfo = pm.getApplicationInfo( pkg, PackageManager.MATCH_UNINSTALLED_PACKAGES, info.userId); - if (appInfo.isInstantApp()) { + if (appInfo != null && appInfo.isInstantApp()) { postInstantAppNotif( pkg, info.userId, -- GitLab