Commit Graph

2 Commits

Author SHA1 Message Date
Nikita Ioffe 60991a57c4 Add VirtualizationModuleFrameworkInitializer
VirtualizationModuleFrameworkInitializer.registerServiceWrappers() is
called in SystemServiceRegistry during zygote initialization to register
Manager classes inside the com.android.virt APEX with the
Context.getSystemService() lookup API.

For the devices without AVF support the
Context.getSystemService(VirtualMachineManager.class) will return null.
A CTS test is added to verify this behaviour.

Bug: 249093790
Test: presubmit
Change-Id: Ib8a94643e5f7ccbfa55dd659d93d02d146af6443
Merged-In: Ib8a94643e5f7ccbfa55dd659d93d02d146af6443
(cherry picked from commit 63594352ae)
2022-11-25 15:57:01 +00:00
Alan Stokes 5c1d9c0f2c Make our javalib more self-contained
Statically link HypervisorProperties, since it's inaccessible to app
code, with jarjar rules to rename it and remove the unneeded
sysprops. This allows clients that are compiled against our stubs to
run correctly.

These changes were originally included in
https://r.android.com/2192919, but they are useful now, before the API
is officially exposed, to allow for experimentation.

Bug: 242828259
Bug: 243512240
Test: Build test APK against stubs, atest MicrodroidHostTests
Change-Id: I6ec49d0a4c9a80100f184f23821b6e9d4ce265f9
2022-09-01 13:41:43 +01:00