Close lid upon suspend and open upon resume
This is a hack to force update the UI when the VM is resumed.
Bug: 348380730
Test: run a VM, go to a UI which is not auto-updated (ex: no cursor).
go out of the VM, and the come back to VM. see the UI is updated.
Change-Id: I7b49f3b68187ab69edb11e53ad82192eeecd6eb8
diff --git a/virtualizationmanager/src/crosvm.rs b/virtualizationmanager/src/crosvm.rs
index 102ac51..13c018b 100644
--- a/virtualizationmanager/src/crosvm.rs
+++ b/virtualizationmanager/src/crosvm.rs
@@ -208,6 +208,7 @@
SingleTouch { file: File, width: u32, height: u32, name: Option<String> },
Keyboard(File),
Mouse(File),
+ Switches(File),
}
type VfioDevice = Strong<dyn IBoundDevice>;
@@ -1137,6 +1138,9 @@
height,
name.as_ref().map_or("".into(), |n| format!(",name={}", n))
),
+ InputDeviceOption::Switches(file) => {
+ format!("switches[path={}]", add_preserved_fd(&mut preserved_fds, file))
+ }
});
}
}