Drop the VM reference when stopped

A VM may exit even without a call to stop() or close(). When we notice
that, drop our reference to the binder interface (to allow GC to kick
in abd VS to exit) and drop our memory pressure callback.

This is mostly good housekeeping, but it also makes sure we don't end
up registering the callback multiple times if we call run() again on
the same VM without an intervening stop().

Bug: 238931615
Test: atest MicrodroidTests
Change-Id: If4c75ca11adf4239e4337405c24ff5db08707e7a
1 file changed
tree: 9c978933bb4ebb30e886cf681ec9e52ace363cc3
  1. apex/
  2. apkdmverity/
  3. authfs/
  4. avmd/
  5. compos/
  6. demo/
  7. docs/
  8. encryptedstore/
  9. javalib/
  10. launcher/
  11. libs/
  12. microdroid/
  13. microdroid_manager/
  14. pvmfw/
  15. rialto/
  16. tests/
  17. virtualizationservice/
  18. vm/
  19. vm_payload/
  20. vmbase/
  21. vmclient/
  22. zipfuse/
  23. .clang-format
  24. .gitignore
  25. Android.bp
  26. OWNERS
  27. PREUPLOAD.cfg
  28. README.md
  29. 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.