Projects >> android-frameworks-base-with-remote-control-service >>e8a00ad288e36204cab2ba2407b42525fe2e44e0

Chunk
Conflicting content
            return defValue;
        }

<<<<<<< HEAD
        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*/);
=======
        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 (f < 0) {
            // negative values are not allowed in pixel dimensions
            Bridge.getLog().error(LayoutLog.TAG_BROKEN,
                    "Negative pixel dimension: " + s,
                    null, null /*data*/);
        }
>>>>>>> f89c37295db5df34c014e0791c976cfa94509068

        return defValue;
    }
Solution content
            return defValue;
        }

        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;
    }
File
BridgeTypedArray.java
Developer's decision
Version 1
Kind of conflict
Cast expression
Comment
If statement
Method invocation
Variable