Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +32 −26 Original line number Diff line number Diff line Loading @@ -66,7 +66,9 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Parcel; import android.os.PowerManager; import android.os.RemoteException; import android.os.UserHandle; import android.util.AttributeSet; import android.util.DisplayMetrics; Loading Loading @@ -679,6 +681,10 @@ public final class BridgeContext extends Context { } } } else if (defStyleRes != 0) { StyleResourceValue item = mDynamicIdToStyleMap.get(defStyleRes); if (item != null) { defStyleValues = item; } else { boolean isFrameworkRes = true; Pair<ResourceType, String> value = Bridge.resolveResourceId(defStyleRes); if (value == null) { Loading @@ -689,8 +695,7 @@ public final class BridgeContext extends Context { if (value != null) { if ((value.getFirst() == ResourceType.STYLE)) { // look for the style in all resources: StyleResourceValue item = mRenderResources.getStyle(value.getSecond(), isFrameworkRes); item = mRenderResources.getStyle(value.getSecond(), isFrameworkRes); if (item != null) { if (defaultPropMap != null) { defaultPropMap.put("style", item.getName()); Loading Loading @@ -719,6 +724,7 @@ public final class BridgeContext extends Context { null); } } } String appNamespace = mLayoutlibCallback.getNamespace(); Loading Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +32 −26 Original line number Diff line number Diff line Loading @@ -66,7 +66,9 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Parcel; import android.os.PowerManager; import android.os.RemoteException; import android.os.UserHandle; import android.util.AttributeSet; import android.util.DisplayMetrics; Loading Loading @@ -679,6 +681,10 @@ public final class BridgeContext extends Context { } } } else if (defStyleRes != 0) { StyleResourceValue item = mDynamicIdToStyleMap.get(defStyleRes); if (item != null) { defStyleValues = item; } else { boolean isFrameworkRes = true; Pair<ResourceType, String> value = Bridge.resolveResourceId(defStyleRes); if (value == null) { Loading @@ -689,8 +695,7 @@ public final class BridgeContext extends Context { if (value != null) { if ((value.getFirst() == ResourceType.STYLE)) { // look for the style in all resources: StyleResourceValue item = mRenderResources.getStyle(value.getSecond(), isFrameworkRes); item = mRenderResources.getStyle(value.getSecond(), isFrameworkRes); if (item != null) { if (defaultPropMap != null) { defaultPropMap.put("style", item.getName()); Loading Loading @@ -719,6 +724,7 @@ public final class BridgeContext extends Context { null); } } } String appNamespace = mLayoutlibCallback.getNamespace(); Loading