Fix tests on aosp_cf_x86_64_only_phone
Our nested virtualization check failed on this target. Move to a
prefix check to support this device and any other ones that appear.
Also extract the code to do the check to a library, rather than
changing in two places.
Bug: 236922543
Test: Presubmit
Change-Id: Id1d424f5f107e2098d89ca2ea8089ba956f212ca
diff --git a/compos/common/Android.bp b/compos/common/Android.bp
index 51f97f8..d1b45c4 100644
--- a/compos/common/Android.bp
+++ b/compos/common/Android.bp
@@ -14,6 +14,7 @@
"libbinder_common",
"libbinder_rpc_unstable_bindgen",
"liblog_rust",
+ "libnested_virt",
"libnum_traits",
"librustutils",
"libvmclient",