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

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

am b243aabd: Merge adaa12cd from honeycomb. do not merge.

* commit 'b243aabd':
  Merge adaa12cd from honeycomb. do not merge.
parents 403da3a7 b243aabd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -393,7 +393,7 @@ public final class Path_Delegate {
        for (int i = 0 ; i < 3 ; i++) {
            if (radii[i * 2] != radii[(i + 1) * 2] || radii[i * 2 + 1] != radii[(i + 1) * 2 + 1]) {
                Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
                        "Different corner size is not support in Path.addRoundRect.",
                        "Different corner sizes are not supported in Path.addRoundRect.",
                        null, null /*data*/);
                break;
            }
+1 −1
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge {
                Capability.UNBOUND_RENDERING,
                Capability.CUSTOM_BACKGROUND_COLOR,
                Capability.RENDER,
                Capability.LAYOUT_ONLY,
                //Capability.LAYOUT_ONLY, // disable to run on ADT 10.0 which doesn't include this.
                Capability.EMBEDDED_LAYOUT,
                Capability.VIEW_MANIPULATION);

+21 −10
Original line number Diff line number Diff line
@@ -488,18 +488,29 @@ public final class BridgeTypedArray extends TypedArray {
            return defValue;
        }

        float f = getDimension(index, defValue);
        final int res = (int)(f+0.5f);
        if (res != 0) return res;
        if (f == 0) return 0;
        if (f > 0) return 1; // this is to support ]0;1[ range (since >=1 is handled 2 lines above)
        if (ResourceHelper.stringToFloat(s, mValue)) {
            float f = mValue.getDimension(mBridgeResources.mMetrics);

            if (f < 0) {
                // negative values are not allowed in pixel dimensions
                Bridge.getLog().error(LayoutLog.TAG_BROKEN,
                        "Negative pixel dimension: " + s,
                        null, null /*data*/);
                return defValue;
            }

            if (f == 0) return 0;
            if (f < 1) return 1;

            return (int)(f+0.5f);
        }

        // looks like we were unable to resolve the dimension value
        Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
                String.format(
                    "\"%1$s\" in attribute \"%2$s\" is not a valid format.",
                    s, mNames[index]), null /*data*/);

        return defValue;
    }