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

Commit 666a5ed9 authored by Xavier Ducrohet's avatar Xavier Ducrohet Committed by Android (Google) Code Review
Browse files

Merge "LayoutLib: parsed resources were always set as platform res."

parents 14b0a6bc 6735cffc
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -319,6 +319,8 @@ public final class BridgeContext extends Activity {
            BridgeXmlBlockParser parser = null;
            parser = (BridgeXmlBlockParser)set;

            isPlatformFile = parser.isPlatformFile();

            Object key = parser.getViewKey();
            if (key != null) {
                defaultPropMap = mDefaultPropMaps.get(key);
@@ -329,7 +331,9 @@ public final class BridgeContext extends Activity {
            }

        } else if (set instanceof BridgeLayoutParamsMapAttributes) {
            // good, nothing to do.
            // this is only for temp layout params generated dynamically, so this is never
            // platform content.
            isPlatformFile = false;
        } else if (set != null) { // null parser is ok
            // really this should not be happening since its instantiated in Bridge
            Bridge.getLog().error(null, "Parser is not a BridgeXmlBlockParser!");
+5 −0
Original line number Diff line number Diff line
@@ -328,6 +328,7 @@ public final class BridgeTypedArray extends TypedArray {
        }

        // looks like were unable to resolve the color value.
        assert false;
        Bridge.getLog().warning(null, String.format(
                "Unable to resolve color value \"%1$s\" in attribute \"%2$s\"",
                value, mNames[index]));
@@ -405,6 +406,7 @@ public final class BridgeTypedArray extends TypedArray {
        }

        // looks like we were unable to resolve the dimension value
        assert false;
        Bridge.getLog().warning(null, String.format(
                "Unable to resolve dimension value \"%1$s\" in attribute \"%2$s\"",
                s, mNames[index]));
@@ -534,6 +536,7 @@ public final class BridgeTypedArray extends TypedArray {
        }

        // looks like we were unable to resolve the fraction value
        assert false;
        Bridge.getLog().warning(null, String.format(
                "Unable to resolve fraction value \"%1$s\" in attribute \"%2$s\"",
                value, mNames[index]));
@@ -641,6 +644,7 @@ public final class BridgeTypedArray extends TypedArray {
            return idValue.intValue();
        }

        assert false;
        Bridge.getLog().warning(null, String.format(
                "Unable to resolve id \"%1$s\" for attribute \"%2$s\"", value, mNames[index]));
        return defValue;
@@ -675,6 +679,7 @@ public final class BridgeTypedArray extends TypedArray {
        }

        // looks like we were unable to resolve the drawable
        assert false;
        Bridge.getLog().warning(null, String.format(
                "Unable to resolve drawable \"%1$s\" in attribute \"%2$s\"", stringValue,
                mNames[index]));
+1 −0
Original line number Diff line number Diff line
@@ -918,6 +918,7 @@ public class LayoutSceneImpl {
            return (StyleResourceValue)parent;
        }

        assert false;
        mParams.getLog().error(null,
                String.format("Unable to resolve parent style name: %s", parentName));