VirtualMachine API changes pre-@SystemApi

This is the set of code changes proposed in
https://r.android.com/2192077, except for the migration to @SystemApi:
- Replace enums with integer constants. Map the AIDL constants to the
  API constants. (Some of this was already done in
  https://r.android.com/2203781.)
- Make connectToVsockServer synchronous rather than using Future.
- Make VirtualMachine AutoCloseable (close() == stop()).
- Add VirtualMachine getters to match the builder's setters.
- Lots of nullability declarations.
- Added @RequiresPermission as appropriate.
- Rename onDied, DeathReason to onStopped, StopReason.
- Assorted documentation tweaks.

Also modify the clients to match.

I want to do this now separately because that CL is going to take a
while to get in, and I want to submit some further changes that modify
VirtualMachineConfig (b/243513572).

Bug: 243512115
Bug: 236811123
Test: atest MicrodroidTests MicrodroidHostTestCases
Test: Install & run demo app
Change-Id: I4bee00ffd23732bc9dfdca8c4c104b487f24907c
10 files changed
tree: 3f99578c988336ade46bc7a6c60501b1524ee1da
  1. .prebuilt_info/
  2. apex/
  3. apkdmverity/
  4. authfs/
  5. avmd/
  6. compos/
  7. demo/
  8. docs/
  9. javalib/
  10. launcher/
  11. libs/
  12. microdroid/
  13. microdroid_manager/
  14. pvmfw/
  15. rialto/
  16. tests/
  17. virtualizationservice/
  18. vm/
  19. vmbase/
  20. vmclient/
  21. zipfuse/
  22. .clang-format
  23. .gitignore
  24. Android.bp
  25. OWNERS
  26. PREUPLOAD.cfg
  27. README.md
  28. TEST_MAPPING
README.md

Virtualization

This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.