Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80656fb7 authored by Xavier Ducrohet's avatar Xavier Ducrohet Committed by Android Git Automerger
Browse files

am 62a99c0b: Merge "LayoutLib: Handle color state list in methods returning an int." into honeycomb

* commit '62a99c0b':
  LayoutLib: Handle color state list in methods returning an int.
parents bb756a90 62a99c0b
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -270,13 +270,10 @@ public final class BridgeTypedArray extends TypedArray {
            return defValue;
        }

        String s = mResourceData[index].getValue();
        try {
            return ResourceHelper.getColor(s);
        } catch (NumberFormatException e) {
            Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e, null /*data*/);

            // we'll return the default value below.
        ColorStateList colorStateList = ResourceHelper.getColorStateList(
                mResourceData[index], mContext);
        if (colorStateList != null) {
            return colorStateList.getDefaultColor();
        }

        return defValue;