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

Commit 0b324e74 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Ricardo Cerqueira
Browse files

roomservice: Extend dependency-checks to devices in main manifest

CM currently keeps devices inherited from AOSP in the main manifest,
so take that into account as well when checking device paths

Change-Id: I9663f283617f237428b4eaa0cd60b5de2b86a7b9
parent 0e1f204e
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -60,6 +60,17 @@ def get_from_manifest(devicename):
        if re.search("android_device_.*_%s$" % device, localpath.get("name")):
        if re.search("android_device_.*_%s$" % device, localpath.get("name")):
            return localpath.get("path")
            return localpath.get("path")


    # Devices originally from AOSP are in the main manifest...
    try:
        mm = ElementTree.parse(".repo/manifest.xml")
        mm = mm.getroot()
    except:
        mm = ElementTree.Element("manifest")

    for localpath in mm.findall("project"):
        if re.search("android_device_.*_%s$" % device, localpath.get("name")):
            return localpath.get("path")

    return None
    return None


def is_in_manifest(projectname):
def is_in_manifest(projectname):