Support mouse in VM
1. By requestPointerCapture, make the app exclusively use the mouse event.
2. Add backgroundTouchView because it looks like set onTouch and
onCapturedPointer listeners to the same view doesn't work as expected
3. requestUnbufferedDispatch because of pointer latency
Bug: 325930922
Test: move/click/wheel
Change-Id: I44cdbda923cb18467ab611c342a3ae4e4112403b
diff --git a/virtualizationmanager/src/aidl.rs b/virtualizationmanager/src/aidl.rs
index a245e11..653281d 100644
--- a/virtualizationmanager/src/aidl.rs
+++ b/virtualizationmanager/src/aidl.rs
@@ -757,6 +757,9 @@
InputDevice::Keyboard(keyboard) => InputDeviceOption::Keyboard(clone_file(
keyboard.pfd.as_ref().ok_or(anyhow!("pfd should have value"))?,
)?),
+ InputDevice::Mouse(mouse) => InputDeviceOption::Mouse(clone_file(
+ mouse.pfd.as_ref().ok_or(anyhow!("pfd should have value"))?,
+ )?),
})
}
/// Given the configuration for a disk image, assembles the `DiskFile` to pass to crosvm.