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

Commit 02d7f45a authored by Aurimas Liutikas's avatar Aurimas Liutikas
Browse files

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
parent a091cc2d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();