Eliminate a short blackout during the resume of the VM display

Before this CL, there was a short period of blackout (1-2 sec) on the
VM's display when it is brought to foreground. This was because we send
a lid-close even when the VM goes background, and a lid-open event when
it goes foreground, and the guest OS needs some time to respond to the
lid-open event and draw a first frame after the wakeup.

This CL fixes the blackout issue, by saving the last good frame just
before the VM goes background, and re-draws the frame when it goes
foreground.

Note that the saved frame could be very old (ex: a few hours ago), so it
may be incorrect. For example, if the guest OS has a clock, the clock on
the saved frame may point to a very far past. However, this is not a big
issue because the guest OS will soon (within 1-2 sec) react to the
lid-open event and draw a correct frame.

Bug: 348380730
Test: run ferrochrome. go to home, and then come back. There's no
blackout.

Change-Id: I895cb04f3aa32f0b2a65947720e3af417af6296c
3 files changed
tree: 37841860a9a0f991d39f73d419dd8b9509beada4
  1. android/
  2. authfs/
  3. build/
  4. compos/
  5. demo_accessor/
  6. docs/
  7. guest/
  8. libs/
  9. tests/
  10. .clang-format
  11. .gitignore
  12. dice_for_avf_guest.cddl
  13. OWNERS
  14. PREUPLOAD.cfg
  15. README.md
  16. rustfmt.toml
  17. TEST_MAPPING
README.md

Android Virtualization Framework (AVF)

Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.

Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.

If you want a quick start, see the getting started guideline and follow the steps there.

For in-depth explanations about individual topics and components, visit the following links.

AVF components:

AVF APIs:

How-Tos: