Fix getAttributeSetSourceResId to AttributeSet created from null.
Xml.asAttributeSet with a null returns non XmlBlock.Parser type object. This fixes the existing test that broke due to my changes to LayoutInflater. Test: atest CtsViewTestCases:LayoutInflaterTest Change-Id: Ib10e07ef3814c5570a6d2bd334481f2e26bb3d3e
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user