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
(cherry picked from commit
ef6676015bfec4538a552204b51e32f02d721fb0)