Remove color attribute from MaskableIconDrawable foreground/background tag
Test: manual test Change-Id: Ia8426051aed8c4451b10cf415e179930caede974
This commit is contained in:
@@ -5846,8 +5846,6 @@
|
||||
|
||||
<!-- Drawable used to draw masked icons with foreground and background layers. -->
|
||||
<declare-styleable name="MaskableIconDrawableLayer">
|
||||
<!-- The color to use for the layer, only if drawable is not defined. -->
|
||||
<attr name="color" />
|
||||
<!-- The drawable to use for the layer. -->
|
||||
<attr name="drawable" />
|
||||
</declare-styleable>
|
||||
|
||||
@@ -427,7 +427,7 @@ public class MaskableIconDrawable extends Drawable implements Drawable.Callback
|
||||
}
|
||||
if (type != XmlPullParser.START_TAG) {
|
||||
throw new XmlPullParserException(parser.getPositionDescription()
|
||||
+ ": <foreground> or <background> tag requires a 'color' or 'drawable'"
|
||||
+ ": <foreground> or <background> tag requires a 'drawable'"
|
||||
+ "attribute or child tag defining a drawable");
|
||||
}
|
||||
|
||||
@@ -451,12 +451,6 @@ public class MaskableIconDrawable extends Drawable implements Drawable.Callback
|
||||
layer.mThemeAttrs = a.extractThemeAttrs();
|
||||
|
||||
Drawable dr = a.getDrawable(R.styleable.MaskableIconDrawableLayer_drawable);
|
||||
if (dr == null) {
|
||||
int color = a.getColor(R.styleable.MaskableIconDrawableLayer_color, Color.TRANSPARENT);
|
||||
if (color != Color.TRANSPARENT) {
|
||||
dr = new ColorDrawable(color);
|
||||
}
|
||||
}
|
||||
if (dr != null) {
|
||||
if (layer.mDrawable != null) {
|
||||
// It's possible that a drawable was already set, in which case
|
||||
|
||||
Reference in New Issue
Block a user