Prevent NPE when checking toast icon label
Test: manual Fixes: 210971093 Change-Id: I8eb15dcb6ab71c5f3e91a7dae08adaaaa5e60ab2
This commit is contained in:
@@ -199,7 +199,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,
|
||||
|
||||
Reference in New Issue
Block a user