Merge "Prevent NPE when checking toast icon label" into sc-v2-dev am: 8db70a3619
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16569869 Change-Id: Icb8f1aa66ad8430d5620654f22ad65f87597e201
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user