mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 15:58:43 +00:00
Camera: Vts: update check for setCallback
A Rust HAL cannot return a service specific error when a nullptr is passed to setCallback, since libbinder_rs checks for nullptr and returns EX_NULL_POINTER before the request reaches the specific HAL. Bug: 360755781 Test: atest VtsAidlHalCameraProvider_TargetTest Change-Id: I8c558aa6b1d7c89b89506b975b4acd97b5571791
This commit is contained in:
committed by
Avichal Rakesh
parent
eb9805c249
commit
731178ea46
@@ -118,7 +118,8 @@ TEST_P(CameraAidlTest, setCallback) {
|
||||
ScopedAStatus ret = mProvider->setCallback(cb);
|
||||
ASSERT_TRUE(ret.isOk());
|
||||
ret = mProvider->setCallback(nullptr);
|
||||
ASSERT_EQ(static_cast<int32_t>(Status::ILLEGAL_ARGUMENT), ret.getServiceSpecificError());
|
||||
ASSERT_TRUE(static_cast<int32_t>(Status::ILLEGAL_ARGUMENT) == ret.getServiceSpecificError() ||
|
||||
EX_NULL_POINTER == ret.getExceptionCode());
|
||||
}
|
||||
|
||||
// Test if ICameraProvider::getCameraDeviceInterface returns Status::OK and non-null device
|
||||
|
||||
Reference in New Issue
Block a user