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

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

Merge "CherryPick 06942bc4 from hc-mr1. do not merge." into gingerbread

parents 9918ffb0 d6465e10
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -296,12 +296,17 @@ public final class BridgeContext extends Activity {

    public Pair<View, Boolean> inflateView(ResourceReference resource, ViewGroup parent,
            boolean attachToRoot, boolean skipCallbackParser) {
        String layoutName = resource.getName();
        boolean isPlatformLayout = resource.isFramework();

        if (isPlatformLayout == false && skipCallbackParser == false) {
            // check if the project callback can provide us with a custom parser.
            ILayoutPullParser parser = mProjectCallback.getParser(layoutName);
            ILayoutPullParser parser;
            if (resource instanceof ResourceValue) {
                parser = mProjectCallback.getParser((ResourceValue) resource);
            } else {
                parser = mProjectCallback.getParser(resource.getName());
            }

            if (parser != null) {
                BridgeXmlBlockParser blockParser = new BridgeXmlBlockParser(parser,
                        this, resource.isFramework());
@@ -369,7 +374,7 @@ public final class BridgeContext extends Activity {
        } else {
            Bridge.getLog().error(LayoutLog.TAG_BROKEN,
                    String.format("Layout %s%s does not exist.", isPlatformLayout ? "android:" : "",
                            layoutName), null);
                            resource.getName()), null);
        }

        return Pair.of(null, false);
+1 −1
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ public final class BridgeResources extends Resources {
            try {
                // check if the current parser can provide us with a custom parser.
                if (mPlatformResourceFlag[0] == false) {
                    parser = mProjectCallback.getParser(value.getName());
                    parser = mProjectCallback.getParser(value);
                }

                // create a new one manually if needed.