AHB: add AHardwareBuffer_getId API in ndk
Add this api to ndk so that there's a reliable system-wide unique id for
caching.
libui is not linkable from sphal so vendors cannot convert an AHB into
GraphicBuffer to call getId(). This change solves the problem.
This change has been forced to refactor the existing docs and
annotations due to -Wnullability-completeness.
Bug: 162425097
Bug: 163615119
Test: atest libnativewindow_test:AHardwareBufferTest#GetIdTest
Change-Id: I91043b96b83bc9a896c361385581e9620fe373c3
6 files changed