Fix NPE in MasterClear
Bug: 5008299 Change-Id: If2d02af7ecda7fe40445a3ec8e023138c5523fd6
This commit is contained in:
@@ -196,13 +196,14 @@ public class MasterClear extends Fragment {
|
|||||||
+ " type=" + account.type);
|
+ " type=" + account.type);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Drawable icon;
|
Drawable icon = null;
|
||||||
try {
|
try {
|
||||||
Context authContext = context.createPackageContext(desc.packageName, 0);
|
if (desc.iconId != 0) {
|
||||||
icon = authContext.getResources().getDrawable(desc.iconId);
|
Context authContext = context.createPackageContext(desc.packageName, 0);
|
||||||
|
icon = authContext.getResources().getDrawable(desc.iconId);
|
||||||
|
}
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
Log.w(TAG, "No icon for account type " + desc.type);
|
Log.w(TAG, "No icon for account type " + desc.type);
|
||||||
icon = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextView child = (TextView)inflater.inflate(R.layout.master_clear_account,
|
TextView child = (TextView)inflater.inflate(R.layout.master_clear_account,
|
||||||
|
Reference in New Issue
Block a user