diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index fb847f9133..e6b34574a9 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -964,7 +964,8 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, @Override public void setTextColor(ColorStateList colors) { - mTextColor = shouldDrawAppContrastTile() ? PillColorProvider.getInstance( + mTextColor = (shouldDrawAppContrastTile() && !TextUtils.isEmpty(getText())) + ? PillColorProvider.getInstance( getContext()).getAppTitleTextPaint().getColor() : colors.getDefaultColor(); mTextColorStateList = colors; @@ -989,7 +990,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, public boolean shouldDrawAppContrastTile() { return mDisplay == DISPLAY_WORKSPACE && shouldTextBeVisible() && PillColorProvider.getInstance(getContext()).isMatchaEnabled() - && enableContrastTiles() && !TextUtils.isEmpty(getText()); + && enableContrastTiles(); } public void setTextVisibility(boolean visible) { diff --git a/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java b/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java index 392d9a7014..05bc4d86a7 100644 --- a/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java +++ b/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java @@ -25,6 +25,7 @@ import android.graphics.drawable.Drawable; import android.os.Build; import android.text.Spannable; import android.text.SpannableString; +import android.text.TextUtils; import android.text.style.ImageSpan; import android.util.AttributeSet; import android.util.Log; @@ -102,7 +103,7 @@ public class DoubleShadowBubbleTextView extends BubbleTextView { @Override public void onDraw(Canvas canvas) { - if (shouldDrawAppContrastTile()) { + if (shouldDrawAppContrastTile() && !TextUtils.isEmpty(getText())) { drawAppContrastTile(canvas); } // If text is transparent or shadow alpha is 0, don't draw any shadow