From 8bcb49230914b5ced2c8b76de38d283000fc597c Mon Sep 17 00:00:00 2001 From: Changyeon Jo Date: Wed, 15 Jan 2020 19:34:50 -0800 Subject: [PATCH] Use regex names for EVS HAL implementations This change deprecates EvsEnumeratorHw, which has been a name for EVS HAL Enumerator implementations, and uses regex names for them. New method, isHardware(), is added to IEvsEnumerator and the clients should use this method to tell whether current service is EVS manager or driver. Bug: 147010694 Test: m -j Test: atest VtsHalEvsV1_1TargetTest Change-Id: I89441936734fde0f0cc2f0151ee9b6622f61814d Signed-off-by: Changyeon Jo --- automotive/evs/1.1/IEvsEnumerator.hal | 7 +++++++ automotive/evs/1.1/default/EvsEnumerator.h | 1 + automotive/evs/1.1/default/ServiceNames.h | 2 +- .../evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp | 2 +- compatibility_matrices/compatibility_matrix.current.xml | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/automotive/evs/1.1/IEvsEnumerator.hal b/automotive/evs/1.1/IEvsEnumerator.hal index 1695821baa..7752b0e330 100644 --- a/automotive/evs/1.1/IEvsEnumerator.hal +++ b/automotive/evs/1.1/IEvsEnumerator.hal @@ -47,4 +47,11 @@ interface IEvsEnumerator extends @1.0::IEvsEnumerator { * configured differently by another client. */ openCamera_1_1(string cameraId, Stream streamCfg) generates (IEvsCamera evsCamera); + + /** + * Tells whether this is EVS manager or HAL implementation. + * + * @return result False for EVS manager implementations and true for all others. + */ + isHardware() generates (bool result); }; diff --git a/automotive/evs/1.1/default/EvsEnumerator.h b/automotive/evs/1.1/default/EvsEnumerator.h index 475ec76b93..ca35dc6f8a 100644 --- a/automotive/evs/1.1/default/EvsEnumerator.h +++ b/automotive/evs/1.1/default/EvsEnumerator.h @@ -59,6 +59,7 @@ public: Return getCameraList_1_1(getCameraList_1_1_cb _hidl_cb) override; Return> openCamera_1_1(const hidl_string& cameraId, const Stream& streamCfg) override; + Return isHardware() override { return true; } // Implementation details EvsEnumerator(); diff --git a/automotive/evs/1.1/default/ServiceNames.h b/automotive/evs/1.1/default/ServiceNames.h index 1178da5a9c..84b1697d0f 100644 --- a/automotive/evs/1.1/default/ServiceNames.h +++ b/automotive/evs/1.1/default/ServiceNames.h @@ -14,4 +14,4 @@ * limitations under the License. */ -const static char kEnumeratorServiceName[] = "EvsEnumeratorHw"; +const static char kEnumeratorServiceName[] = "hw/0"; diff --git a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp index 4fc4e4c144..1a622452da 100644 --- a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp +++ b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp @@ -117,7 +117,7 @@ public: pEnumerator = getService(service_name); ASSERT_NE(pEnumerator.get(), nullptr); - mIsHwModule = !service_name.compare(kEnumeratorName); + mIsHwModule = pEnumerator->isHardware(); } virtual void TearDown() override { diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml index b9d300126f..c2566e918f 100644 --- a/compatibility_matrices/compatibility_matrix.current.xml +++ b/compatibility_matrices/compatibility_matrix.current.xml @@ -45,6 +45,7 @@ IEvsEnumerator default + [a-z]+/[0-9]+