gralloc ashmem hack to delay cb close

Tired of public emulators not working with O

See this CL for context:

https://android-review.googlesource.com/#/c/372376/

This CL moves that to the guest, and detects if
each gralloc cb has been opened at least once
before allowing gralloc_free to call rcCloseColorBuffer.

Images using Treble / HIDL gralloc that have this CL
should work with older emulator versions.

Bug: 37302997

Test: Build and run sdk_google_aw_x86-userdebug emulator

Change-Id: Ice72269e4295497825050385b15dbdec2258100c
2 files changed
tree: e956fe7377d7081b8551f01f7603612dff0827ea
  1. host/
  2. shared/
  3. system/
  4. tests/
  5. Android.mk
  6. common.mk
  7. README