From a190be3f8667eb9de6ad26e7913367f70a4132ef Mon Sep 17 00:00:00 2001 From: John Reck Date: Mon, 9 Jan 2023 16:02:54 -0500 Subject: [PATCH] Clarify deprecation message Note that it's still used if mapper@4 is still used Test: n/a doc only change Change-Id: I21d3070684592f2931842acb43466ae4236856e6 --- .../hardware/graphics/allocator/AllocationError.aidl | 6 +++--- .../android/hardware/graphics/allocator/IAllocator.aidl | 2 +- .../android/hardware/graphics/allocator/IAllocator.aidl | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/current/android/hardware/graphics/allocator/AllocationError.aidl b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/current/android/hardware/graphics/allocator/AllocationError.aidl index 6e7b739ed5..e50d170b62 100644 --- a/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/current/android/hardware/graphics/allocator/AllocationError.aidl +++ b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/current/android/hardware/graphics/allocator/AllocationError.aidl @@ -34,7 +34,7 @@ package android.hardware.graphics.allocator; @Backing(type="int") @VintfStability enum AllocationError { - BAD_DESCRIPTOR = 0, - NO_RESOURCES = 1, - UNSUPPORTED = 2, + BAD_DESCRIPTOR, + NO_RESOURCES, + UNSUPPORTED, } diff --git a/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/current/android/hardware/graphics/allocator/IAllocator.aidl b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/current/android/hardware/graphics/allocator/IAllocator.aidl index 48bef16fb5..66e49a70c0 100644 --- a/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/current/android/hardware/graphics/allocator/IAllocator.aidl +++ b/graphics/allocator/aidl/aidl_api/android.hardware.graphics.allocator/current/android/hardware/graphics/allocator/IAllocator.aidl @@ -35,7 +35,7 @@ package android.hardware.graphics.allocator; @VintfStability interface IAllocator { /** - * @deprecated As of android.hardware.graphics.allocator-V2, this is deprecated & replaced with allocate2 + * @deprecated As of android.hardware.graphics.allocator-V2 in combination with AIMAPPER_VERSION_5 this is deprecated & replaced with allocate2. If android.hardware.graphics.mapper@4 is still in use, however, this is still required to be implemented. */ android.hardware.graphics.allocator.AllocationResult allocate(in byte[] descriptor, in int count); android.hardware.graphics.allocator.AllocationResult allocate2(in android.hardware.graphics.allocator.BufferDescriptorInfo descriptor, in int count); diff --git a/graphics/allocator/aidl/android/hardware/graphics/allocator/IAllocator.aidl b/graphics/allocator/aidl/android/hardware/graphics/allocator/IAllocator.aidl index 71cebd6717..2277bae207 100644 --- a/graphics/allocator/aidl/android/hardware/graphics/allocator/IAllocator.aidl +++ b/graphics/allocator/aidl/android/hardware/graphics/allocator/IAllocator.aidl @@ -32,8 +32,10 @@ interface IAllocator { * @param count The number of buffers to allocate. * @return An AllocationResult containing the result of the allocation * @throws AllocationError on failure - * @deprecated As of android.hardware.graphics.allocator-V2, this is deprecated & replaced with - * allocate2 + * @deprecated As of android.hardware.graphics.allocator-V2 in combination with + * AIMAPPER_VERSION_5 this is deprecated & replaced with allocate2. + * If android.hardware.graphics.mapper@4 is still in use, however, this is + * still required to be implemented. */ AllocationResult allocate(in byte[] descriptor, in int count);