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

Commit 1665da17 authored by Max Loh's avatar Max Loh Committed by Android (Google) Code Review
Browse files

Merge "aslgen od to hr initial implementation" into main

parents 3a5aa465 6108177c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -59,7 +59,8 @@ public class AslConverter {
        switch (format) {
        switch (format) {
            case HUMAN_READABLE:
            case HUMAN_READABLE:
                Element appMetadataBundles =
                Element appMetadataBundles =
                        XmlUtils.getSingleElement(document, XmlUtils.HR_TAG_APP_METADATA_BUNDLES);
                        XmlUtils.getSingleChildElement(
                                document, XmlUtils.HR_TAG_APP_METADATA_BUNDLES, true);


                return new AndroidSafetyLabelFactory()
                return new AndroidSafetyLabelFactory()
                        .createFromHrElements(XmlUtils.listOf(appMetadataBundles));
                        .createFromHrElements(XmlUtils.listOf(appMetadataBundles));
+6 −0
Original line number Original line Diff line number Diff line
@@ -61,4 +61,10 @@ public class AndroidSafetyLabel implements AslMarshallable {
        }
        }
        return XmlUtils.listOf(aslEle);
        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 Original line Diff line number Diff line
@@ -55,4 +55,11 @@ public class AndroidSafetyLabelFactory implements AslMarshallableFactory<Android
        return new AndroidSafetyLabel(
        return new AndroidSafetyLabel(
                version, systemAppSafetyLabel, safetyLabels, transparencyInfo);
                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 Original line Diff line number Diff line
@@ -142,4 +142,10 @@ public class AppInfo implements AslMarshallable {
        }
        }
        return XmlUtils.listOf(appInfoEle);
        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 Original line Diff line number Diff line
@@ -72,4 +72,10 @@ public class AppInfoFactory implements AslMarshallableFactory<AppInfo> {
                email,
                email,
                website);
                website);
    }
    }

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