Device-aware native SensorManager.
Add device id to SensorManager instances based on the devices
this UID is present on. SensorManager queries the native VDM
instance for the deviceId and the sensor policy of that device.
If the UID is present only on a single virtual device and that
device has custom sensors, then give it that device's sensors by
default. If the UID is not on any virtual devices or is on more
than one, then give it the default device's sensors.
Fix: 303535376
Test: manual with streamed app using sensor NDK to a virtual device
Change-Id: I275a010a7a70b34176deaf4c9dcd61188c83ac32
diff --git a/libs/sensor/Android.bp b/libs/sensor/Android.bp
index b6b9cc4..d992aa5 100644
--- a/libs/sensor/Android.bp
+++ b/libs/sensor/Android.bp
@@ -49,6 +49,7 @@
"liblog",
"libhardware",
"libpermission",
+ "android.companion.virtual.virtualdevice_aidl-cpp",
],
export_include_dirs: ["include"],