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

Commit d30f4c67 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Prevent NPE when checking toast icon label

Test: manual
Fixes: 210971093
Change-Id: I8eb15dcb6ab71c5f3e91a7dae08adaaaa5e60ab2
Merged-In: I8eb15dcb6ab71c5f3e91a7dae08adaaaa5e60ab2
(cherry picked from commit aeacd49f)
parent b09275f1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -200,7 +200,9 @@ public class SystemUIToast implements ToastPlugin.Toast {
                iconView.setVisibility(View.GONE);
            } else {
                iconView.setImageDrawable(icon);
                if (appInfo.labelRes != 0) {
                if (appInfo == null) {
                    Log.d(TAG, "No appInfo for pkg=" + mPackageName + " usr=" + mUserId);
                } else if (appInfo.labelRes != 0) {
                    try {
                        Resources res = mContext.getPackageManager().getResourcesForApplication(
                                appInfo,