Remove color attribute from MaskableIconDrawable foreground/background tag

Test: manual test

Change-Id: Ia8426051aed8c4451b10cf415e179930caede974
This commit is contained in:
Hyunyoung Song
2017-02-14 10:22:44 -08:00
parent 1ea19d3463
commit 966ad0b2f5
2 changed files with 1 additions and 9 deletions

View File

@@ -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>

View File

@@ -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