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

Commit cb96b847 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix manifest_check.py for generated manifests that have no application...

Merge "Fix manifest_check.py for generated manifests that have no application tag" into main am: f27f0205

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2777931



Change-Id: I3f75673603b96e8ce70e33b5aae84d39fc44eb50
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 72fd3d4e f27f0205
Loading
Loading
Loading
Loading
+6 −7
Original line number Original line Diff line number Diff line
@@ -187,18 +187,17 @@ def extract_uses_libs_apk(badging):
    return required, optional, tags
    return required, optional, tags




def extract_uses_libs_xml(xml): #pylint: disable=inconsistent-return-statements
def extract_uses_libs_xml(xml):
    """Extract <uses-library> tags from the manifest."""
    """Extract <uses-library> tags from the manifest."""


    manifest = parse_manifest(xml)
    manifest = parse_manifest(xml)
    elems = get_children_with_tag(manifest, 'application')
    elems = get_children_with_tag(manifest, 'application')
    application = elems[0] if len(elems) == 1 else None
    if len(elems) > 1:
    if len(elems) > 1: #pylint: disable=no-else-raise
        raise RuntimeError('found multiple <application> tags')
        raise RuntimeError('found multiple <application> tags')
    elif not elems:
    if not elems:
        if uses_libraries or optional_uses_libraries: #pylint: disable=undefined-variable
        return [], [], []
            raise ManifestMismatchError('no <application> tag found')

        return
    application = elems[0]


    libs = get_children_with_tag(application, 'uses-library')
    libs = get_children_with_tag(application, 'uses-library')