Merge "Fix getAttributeSetSourceResId to AttributeSet created from null."

This commit is contained in:
TreeHugger Robot
2019-03-09 03:51:55 +00:00
committed by Android (Google) Code Review

View File

@@ -1303,7 +1303,7 @@ public class ResourcesImpl {
@AnyRes
static int getAttributeSetSourceResId(@Nullable AttributeSet set) {
if (set == null) {
if (set == null || !(set instanceof XmlBlock.Parser)) {
return ID_NULL;
}
return ((XmlBlock.Parser) set).getSourceResId();