Merge "Check appEntry is not null before dereferencing it" into sc-dev

This commit is contained in:
Beverly Tai
2021-04-13 21:56:29 +00:00
committed by Android (Google) Code Review

View File

@@ -233,7 +233,7 @@ public class SystemUIToast implements ToastPlugin.Toast {
return null;
}
final AppEntry appEntry = appState.getEntry(packageName, userId);
if (appEntry.info == null
if (appEntry == null || appEntry.info == null
|| !ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER.filterApp(appEntry)) {
return null;
}