From 13d1d10666be152a8e7471b2fd1c28b071e620ac Mon Sep 17 00:00:00 2001 From: Changyeon Jo Date: Thu, 27 Jan 2022 21:32:28 -0800 Subject: [PATCH] Fix a data type of the display ID The valid display ID ranges from 0 to 255 so this changes its data type from a 8-bit signed integer to 32-bit signed integer. Bug: 170401743 Test: Successful build Change-Id: Ic4cb38d2d0446e169652689a3d3c71f1d7240455 --- .../current/android/hardware/automotive/evs/IEvsEnumerator.aidl | 2 +- .../aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl | 2 +- automotive/evs/aidl/impl/default/include/DefaultEvsEnumerator.h | 2 +- automotive/evs/aidl/impl/default/src/DefaultEvsEnumerator.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/automotive/evs/aidl/aidl_api/android.hardware.automotive.evs/current/android/hardware/automotive/evs/IEvsEnumerator.aidl b/automotive/evs/aidl/aidl_api/android.hardware.automotive.evs/current/android/hardware/automotive/evs/IEvsEnumerator.aidl index a79c68d898..225b5041b8 100644 --- a/automotive/evs/aidl/aidl_api/android.hardware.automotive.evs/current/android/hardware/automotive/evs/IEvsEnumerator.aidl +++ b/automotive/evs/aidl/aidl_api/android.hardware.automotive.evs/current/android/hardware/automotive/evs/IEvsEnumerator.aidl @@ -44,7 +44,7 @@ interface IEvsEnumerator { android.hardware.automotive.evs.UltrasonicsArrayDesc[] getUltrasonicsArrayList(); boolean isHardware(); android.hardware.automotive.evs.IEvsCamera openCamera(in String cameraId, in android.hardware.automotive.evs.Stream streamCfg); - android.hardware.automotive.evs.IEvsDisplay openDisplay(in byte id); + android.hardware.automotive.evs.IEvsDisplay openDisplay(in int id); android.hardware.automotive.evs.IEvsUltrasonicsArray openUltrasonicsArray(in String ultrasonicsArrayId); void registerStatusCallback(in android.hardware.automotive.evs.IEvsEnumeratorStatusCallback callback); } diff --git a/automotive/evs/aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl b/automotive/evs/aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl index 8e380e0bd4..86987008c5 100644 --- a/automotive/evs/aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl +++ b/automotive/evs/aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl @@ -146,7 +146,7 @@ interface IEvsEnumerator { * @return EvsDisplay object to be used. * @throws EvsResult::INVALID_ARG if no display with a given id exists */ - IEvsDisplay openDisplay(in byte id); + IEvsDisplay openDisplay(in int id); /** * Gets the IEvsUltrasonicsArray associated with a ultrasonicsArrayId from a diff --git a/automotive/evs/aidl/impl/default/include/DefaultEvsEnumerator.h b/automotive/evs/aidl/impl/default/include/DefaultEvsEnumerator.h index 8bcd867d48..03a578d954 100644 --- a/automotive/evs/aidl/impl/default/include/DefaultEvsEnumerator.h +++ b/automotive/evs/aidl/impl/default/include/DefaultEvsEnumerator.h @@ -37,7 +37,7 @@ class DefaultEvsEnumerator final const ::aidl::android::hardware::automotive::evs::CameraDesc& desc, std::vector<::aidl::android::hardware::automotive::evs::Stream>* _aidl_return) override; ::ndk::ScopedAStatus openDisplay( - int8_t displayId, + int32_t displayId, std::shared_ptr<::aidl::android::hardware::automotive::evs::IEvsDisplay>* obj) override; ::ndk::ScopedAStatus closeDisplay( const std::shared_ptr<::aidl::android::hardware::automotive::evs::IEvsDisplay>& obj) diff --git a/automotive/evs/aidl/impl/default/src/DefaultEvsEnumerator.cpp b/automotive/evs/aidl/impl/default/src/DefaultEvsEnumerator.cpp index 2ff6d59af2..5a81d05850 100644 --- a/automotive/evs/aidl/impl/default/src/DefaultEvsEnumerator.cpp +++ b/automotive/evs/aidl/impl/default/src/DefaultEvsEnumerator.cpp @@ -51,7 +51,7 @@ ScopedAStatus DefaultEvsEnumerator::getStreamList(const CameraDesc& desc, return ScopedAStatus::ok(); } -ScopedAStatus DefaultEvsEnumerator::openDisplay(int8_t displayId, +ScopedAStatus DefaultEvsEnumerator::openDisplay(int32_t displayId, std::shared_ptr* obj) { return ScopedAStatus::ok(); }