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

Commit 6108177c authored by Max Loh's avatar Max Loh
Browse files

aslgen od to hr initial implementation

Bug: 329902686
Test: Unit tests.
Change-Id: I11513892b6f87d1a6fa229c56089152fc6158af1
parent ba7eba9c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ public class AslConverter {
        switch (format) {
            case HUMAN_READABLE:
                Element appMetadataBundles =
                        XmlUtils.getSingleElement(document, XmlUtils.HR_TAG_APP_METADATA_BUNDLES);
                        XmlUtils.getSingleChildElement(
                                document, XmlUtils.HR_TAG_APP_METADATA_BUNDLES, true);

                return new AndroidSafetyLabelFactory()
                        .createFromHrElements(XmlUtils.listOf(appMetadataBundles));
+6 −0
Original line number Diff line number Diff line
@@ -61,4 +61,10 @@ public class AndroidSafetyLabel implements AslMarshallable {
        }
        return XmlUtils.listOf(aslEle);
    }

    /** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
    @Override
    public List<Element> toHrDomElements(Document doc) {
        return List.of();
    }
}
+7 −0
Original line number Diff line number Diff line
@@ -55,4 +55,11 @@ public class AndroidSafetyLabelFactory implements AslMarshallableFactory<Android
        return new AndroidSafetyLabel(
                version, systemAppSafetyLabel, safetyLabels, transparencyInfo);
    }

    /** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
    @Override
    public AndroidSafetyLabel createFromOdElements(List<Element> elements)
            throws MalformedXmlException {
        return null;
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -142,4 +142,10 @@ public class AppInfo implements AslMarshallable {
        }
        return XmlUtils.listOf(appInfoEle);
    }

    /** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
    @Override
    public List<Element> toHrDomElements(Document doc) {
        return List.of();
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -72,4 +72,10 @@ public class AppInfoFactory implements AslMarshallableFactory<AppInfo> {
                email,
                website);
    }

    /** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
    @Override
    public AppInfo createFromOdElements(List<Element> elements) throws MalformedXmlException {
        return null;
    }
}
Loading