Merge "Prevent NPE when checking toast icon label" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8db70a3619
@@ -200,7 +200,9 @@ public class SystemUIToast implements ToastPlugin.Toast {
|
|||||||
iconView.setVisibility(View.GONE);
|
iconView.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
iconView.setImageDrawable(icon);
|
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 {
|
try {
|
||||||
Resources res = mContext.getPackageManager().getResourcesForApplication(
|
Resources res = mContext.getPackageManager().getResourcesForApplication(
|
||||||
appInfo,
|
appInfo,
|
||||||
|
|||||||
Reference in New Issue
Block a user