Add AHardwareBuffer_isSupported.

This new function will check whether a buffer with the given description
is allocatable. If the function returns false, buffer allocation will
never succeed. The current implementation performs a trial allocation
of a small buffer, but in the future this will be replaced by a HAL query.

Bug: 115660272
Test: Builds and passes CTS on Pixel 2.

Change-Id: Id0b1573ebf3194b1163324da773279da95782143
diff --git a/libs/nativewindow/libnativewindow.map.txt b/libs/nativewindow/libnativewindow.map.txt
index 753954d..a796e97 100644
--- a/libs/nativewindow/libnativewindow.map.txt
+++ b/libs/nativewindow/libnativewindow.map.txt
@@ -5,6 +5,7 @@
     AHardwareBuffer_createFromHandle; # vndk
     AHardwareBuffer_describe;
     AHardwareBuffer_getNativeHandle; # vndk
+    AHardwareBuffer_isSupported; # introduced=29
     AHardwareBuffer_lock;
     AHardwareBuffer_recvHandleFromUnixSocket;
     AHardwareBuffer_release;