Track API council feedback

Fixes: 319284591
Test: make && atest libnativewindow_test
Change-Id: I7d6521ff43bf7a79dc6c6e45610108b82e469dc8
diff --git a/libs/nativewindow/AHardwareBuffer.cpp b/libs/nativewindow/AHardwareBuffer.cpp
index 745b6f3..5261287 100644
--- a/libs/nativewindow/AHardwareBuffer.cpp
+++ b/libs/nativewindow/AHardwareBuffer.cpp
@@ -586,7 +586,7 @@
     return NO_ERROR;
 }
 
-enum AHardwareBufferStatus AHardwareBuffer_allocate2(
+enum AHardwareBufferStatus AHardwareBuffer_allocateWithOptions(
         const AHardwareBuffer_Desc* desc, const AHardwareBufferLongOptions* additionalOptions,
         size_t additionalOptionsSize, AHardwareBuffer** outBuffer) {
     (void)additionalOptions;
diff --git a/libs/nativewindow/include/vndk/hardware_buffer.h b/libs/nativewindow/include/vndk/hardware_buffer.h
index 4918601..bcfae10 100644
--- a/libs/nativewindow/include/vndk/hardware_buffer.h
+++ b/libs/nativewindow/include/vndk/hardware_buffer.h
@@ -150,7 +150,7 @@
  *         AHARDWAREBUFFER_STATUS_UNKNOWN_ERROR for any other error
  * any reason. The returned buffer has a reference count of 1.
  */
-enum AHardwareBufferStatus AHardwareBuffer_allocate2(
+enum AHardwareBufferStatus AHardwareBuffer_allocateWithOptions(
         const AHardwareBuffer_Desc* _Nonnull desc,
         const AHardwareBufferLongOptions* _Nullable additionalOptions, size_t additionalOptionsSize,
         AHardwareBuffer* _Nullable* _Nonnull outBuffer) __INTRODUCED_IN(__ANDROID_API_V__);
diff --git a/libs/nativewindow/libnativewindow.map.txt b/libs/nativewindow/libnativewindow.map.txt
index 8bc1292..e29d5a6 100644
--- a/libs/nativewindow/libnativewindow.map.txt
+++ b/libs/nativewindow/libnativewindow.map.txt
@@ -2,7 +2,7 @@
   global:
     AHardwareBuffer_acquire;
     AHardwareBuffer_allocate;
-    AHardwareBuffer_allocate2; # llndk systemapi
+    AHardwareBuffer_allocateWithOptions; # llndk systemapi
     AHardwareBuffer_createFromHandle; # llndk systemapi
     AHardwareBuffer_describe;
     AHardwareBuffer_getId; # introduced=31
diff --git a/libs/nativewindow/tests/AHardwareBufferTest.cpp b/libs/nativewindow/tests/AHardwareBufferTest.cpp
index 1f0128a..136395a 100644
--- a/libs/nativewindow/tests/AHardwareBufferTest.cpp
+++ b/libs/nativewindow/tests/AHardwareBufferTest.cpp
@@ -188,7 +188,7 @@
     };
 
     AHardwareBuffer* buffer = nullptr;
-    ASSERT_EQ(0, AHardwareBuffer_allocate2(&desc, nullptr, 0, &buffer));
+    ASSERT_EQ(0, AHardwareBuffer_allocateWithOptions(&desc, nullptr, 0, &buffer));
     uint64_t id = 0;
     EXPECT_EQ(0, AHardwareBuffer_getId(buffer, &id));
     EXPECT_NE(0, id);
@@ -219,7 +219,7 @@
     std::array<AHardwareBufferLongOptions, 1> extras = {{
             {.name = "android.hardware.graphics.common.Dataspace", ADATASPACE_DISPLAY_P3},
     }};
-    ASSERT_EQ(0, AHardwareBuffer_allocate2(&desc, extras.data(), extras.size(), &buffer));
+    ASSERT_EQ(0, AHardwareBuffer_allocateWithOptions(&desc, extras.data(), extras.size(), &buffer));
     uint64_t id = 0;
     EXPECT_EQ(0, AHardwareBuffer_getId(buffer, &id));
     EXPECT_NE(0, id);