c2 vp9, av1: List P010 in color formats only if it is supported

AHardwareBuffer_isSupported() now supports P010 format and thus
can be used to check if P010 is supported before advertising it as
as supported pixel format.

Also this is now instead of an extra allocation that was done earlier
to check if a format was supported.

Bug: 214411172
Test: atest CtsMediaDecoderTestCases:ImageReaderDecoderTest -- \
 --module-arg \
 CtsMediaDecoderTestCases:instrumentation-arg:codec-prefix:=c2.android.
Test: atest android.mediav2.cts.CodecDecoderSurfaceTest \
 android.mediav2.cts.AdaptivePlaybackTest \
 android.mediav2.cts.CodecDecoderTest -- --module-arg \
 CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.

Change-Id: Iee516a1d45ab82308e74fe6941be748a12bab8af
diff --git a/media/codec2/components/base/Android.bp b/media/codec2/components/base/Android.bp
index 160e250..809f942 100644
--- a/media/codec2/components/base/Android.bp
+++ b/media/codec2/components/base/Android.bp
@@ -27,6 +27,11 @@
         "libsfplugin_ccodec_utils",
     ],
 
+    header_libs: [
+        "libarect_headers",
+        "libnativewindow_headers",
+    ],
+
     shared_libs: [
         "libcutils", // for properties
         "liblog", // for ALOG
@@ -61,6 +66,11 @@
         "libsfplugin_ccodec_utils",
     ],
 
+    header_libs: [
+        "libarect_headers",
+        "libnativewindow_headers",
+    ],
+
     shared_libs: [
         "libcodec2_soft_common",
         "libcutils", // for properties