diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java index 6c9dc85e45d45..6f2642a674258 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java @@ -90,8 +90,12 @@ public class UserAvatarView extends View { public void setBitmap(Bitmap bitmap) { setDrawable(null); mBitmap = bitmap; - mBitmapPaint.setShader(new BitmapShader( - bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP)); + if (mBitmap != null) { + mBitmapPaint.setShader(new BitmapShader( + bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP)); + } else { + mBitmapPaint.setShader(null); + } configureBounds(); invalidate(); }