From 1ab7ede75bf9a25cf894e9f3ef4c7b885451bf3c Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Thu, 13 Dec 2018 15:05:31 -0500 Subject: Set initial color in bg Drawable as TRANSPARENT If the color is not set, the tiles appear as black before they are properly drawn and tinted. This is visible when switching from secondary user to Owner Test: Visual Change-Id: I5d2801484b036ef2dd22153672519911fceaa3c3 Fixes: 120883348 --- .../SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java index 32fd2dcedd0e..bfcf0214dd05 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java @@ -19,6 +19,7 @@ import android.animation.ValueAnimator; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; +import android.graphics.Color; import android.graphics.Path; import android.graphics.drawable.AdaptiveIconDrawable; import android.graphics.drawable.Drawable; @@ -88,6 +89,7 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { float pathSize = AdaptiveIconDrawable.MASK_SIZE; PathShape p = new PathShape(path, pathSize, pathSize); ShapeDrawable d = new ShapeDrawable(p); + d.setTintList(ColorStateList.valueOf(Color.TRANSPARENT)); int bgSize = context.getResources().getDimensionPixelSize(R.dimen.qs_tile_background_size); d.setIntrinsicHeight(bgSize); d.setIntrinsicWidth(bgSize); -- cgit v1.2.3-59-g8ed1b