]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
lxc: Add non-treble camera support
authorErfan Abdi <erfangplus@gmail.com>
Tue, 19 Oct 2021 03:02:42 +0000 (06:32 +0330)
committerErfan Abdi <erfangplus@gmail.com>
Tue, 19 Oct 2021 03:02:42 +0000 (06:32 +0330)
tools/helpers/lxc.py

index 220d4e6646b6df44ceaa6384ebe5542412616f7a..eb290afebc7016edd5203e79f8ddfebcf4633c27 100644 (file)
@@ -196,6 +196,15 @@ def make_base_props(args):
     if vulkan != "":
         props.append("ro.hardware.vulkan=" + vulkan)
 
+    treble = tools.helpers.props.host_get(args, "ro.treble.enabled")
+    if treble != "true":
+        camera = find_hal("camera")
+        if camera != "":
+            props.append("ro.hardware.camera=" + camera)
+        else:
+            if args.vendor_type == "MAINLINE":
+                props.append("ro.hardware.camera=v4l2")
+
     opengles = tools.helpers.props.host_get(args, "ro.opengles.version")
     if opengles == "":
         opengles = "196608"
@@ -207,7 +216,6 @@ def make_base_props(args):
 
     if args.vendor_type == "MAINLINE":
         props.append("ro.vndk.lite=true")
-        props.append("ro.hardware.camera=v4l2")
 
     base_props = open(args.work + "/waydroid_base.prop", "w")
     for prop in props: