Merge "Prevent NPE inside iconloader library" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot
2019-02-12 18:09:08 +00:00
committed by Android (Google) Code Review
@@ -263,7 +263,9 @@ public class BaseIconFactory implements AutoCloseable {
*/
public Bitmap createIconBitmap(Drawable icon, float scale, int size) {
Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
if (icon == null) {
return bitmap;
}
mCanvas.setBitmap(bitmap);
mOldBounds.set(icon.getBounds());