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

Commit a43c4fa0 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

Add namespace before attr name in defPropMap

Change-Id: I36d094fb69d5f5ce0aebde04960ffcd19c27a2eb
parent e70464e1
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -861,7 +861,9 @@ public final class BridgeContext extends Context {
                        resValue = mRenderResources.resolveResValue(resValue);

                        if (defaultPropMap != null) {
                            defaultPropMap.put(attrName,
                            defaultPropMap.put(
                                    frameworkAttr ? SdkConstants.PREFIX_ANDROID + attrName :
                                            attrName,
                                    new Property(preResolve, resValue.getValue()));
                        }

@@ -932,7 +934,8 @@ public final class BridgeContext extends Context {
            @Nullable StyleResourceValue style, int[] attrs) throws Resources.NotFoundException {
        List<Pair<String, Boolean>> attributes = searchAttrs(attrs);

        BridgeTypedArray ta = Resources_Delegate.newTypeArray(mSystemResources, attrs.length, false);
        BridgeTypedArray ta =
                Resources_Delegate.newTypeArray(mSystemResources, attrs.length, false);

        PropertiesMap defaultPropMap = new PropertiesMap();
        // for each attribute, get its name so that we can search it in the style
@@ -943,11 +946,11 @@ public final class BridgeContext extends Context {
                // look for the value in the given style
                ResourceValue resValue;
                String attrName = attribute.getFirst();
                boolean frameworkAttr = attribute.getSecond();
                if (style != null) {
                    resValue = mRenderResources.findItemInStyle(style, attrName,
                            attribute.getSecond());
                    resValue = mRenderResources.findItemInStyle(style, attrName, frameworkAttr);
                } else {
                    resValue = mRenderResources.findItemInTheme(attrName, attribute.getSecond());
                    resValue = mRenderResources.findItemInTheme(attrName, frameworkAttr);
                }

                if (resValue != null) {
@@ -955,8 +958,10 @@ public final class BridgeContext extends Context {
                    String preResolve = resValue.getValue();
                    // resolve it to make sure there are no references left.
                    resValue = mRenderResources.resolveResValue(resValue);
                    ta.bridgeSetValue(i, attrName, attribute.getSecond(), resValue);
                    defaultPropMap.put(attrName, new Property(preResolve, resValue.getValue()));
                    ta.bridgeSetValue(i, attrName, frameworkAttr, resValue);
                    defaultPropMap.put(
                            frameworkAttr ? SdkConstants.ANDROID_PREFIX + attrName : attrName,
                            new Property(preResolve, resValue.getValue()));
                }
            }
        }