mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5713463) into stage-aosp-master" into stage-aosp-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
fa93b63879
@@ -607,7 +607,9 @@ public:
|
||||
|
||||
struct DeviceCb : public V3_5::ICameraDeviceCallback {
|
||||
DeviceCb(CameraHidlTest *parent, int deviceVersion, const camera_metadata_t *staticMeta) :
|
||||
mParent(parent), mDeviceVersion(deviceVersion), mStaticMetadata(staticMeta) {}
|
||||
mParent(parent), mDeviceVersion(deviceVersion) {
|
||||
mStaticMetadata = staticMeta;
|
||||
}
|
||||
|
||||
Return<void> processCaptureResult_3_4(
|
||||
const hidl_vec<V3_4::CaptureResult>& results) override;
|
||||
@@ -631,7 +633,7 @@ public:
|
||||
|
||||
CameraHidlTest *mParent; // Parent object
|
||||
int mDeviceVersion;
|
||||
const camera_metadata_t *mStaticMetadata;
|
||||
android::hardware::camera::common::V1_0::helper::CameraMetadata mStaticMetadata;
|
||||
bool hasOutstandingBuffersLocked();
|
||||
|
||||
/* members for requestStreamBuffers() and returnStreamBuffers()*/
|
||||
@@ -1194,18 +1196,20 @@ bool CameraHidlTest::DeviceCb::processCaptureResultLocked(const CaptureResult& r
|
||||
// Verify final result metadata
|
||||
bool isAtLeast_3_5 = mDeviceVersion >= CAMERA_DEVICE_API_VERSION_3_5;
|
||||
if (isAtLeast_3_5) {
|
||||
auto staticMetadataBuffer = mStaticMetadata.getAndLock();
|
||||
bool isMonochrome = Status::OK ==
|
||||
CameraHidlTest::isMonochromeCamera(mStaticMetadata);
|
||||
CameraHidlTest::isMonochromeCamera(staticMetadataBuffer);
|
||||
if (isMonochrome) {
|
||||
mParent->verifyMonochromeCameraResult(request->collectedResult);
|
||||
}
|
||||
|
||||
// Verify logical camera result metadata
|
||||
bool isLogicalCamera =
|
||||
Status::OK == CameraHidlTest::isLogicalMultiCamera(mStaticMetadata);
|
||||
Status::OK == CameraHidlTest::isLogicalMultiCamera(staticMetadataBuffer);
|
||||
if (isLogicalCamera) {
|
||||
mParent->verifyLogicalCameraResult(mStaticMetadata, request->collectedResult);
|
||||
mParent->verifyLogicalCameraResult(staticMetadataBuffer, request->collectedResult);
|
||||
}
|
||||
mStaticMetadata.unlock(staticMetadataBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4131,6 +4135,8 @@ TEST_F(CameraHidlTest, processMultiCaptureRequestPreview) {
|
||||
&useHalBufManager /*out*/, &cb /*out*/, 0 /*streamConfigCounter*/,
|
||||
true /*allowUnsupport*/);
|
||||
if (session3_5 == nullptr) {
|
||||
ret = session3_4->close();
|
||||
ASSERT_TRUE(ret.isOk());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -5402,7 +5408,7 @@ void CameraHidlTest::configurePreviewStream(const std::string &name, int32_t dev
|
||||
ASSERT_EQ(Status::OK, s);
|
||||
staticMeta = clone_camera_metadata(
|
||||
reinterpret_cast<const camera_metadata_t*>(metadata.data()));
|
||||
ASSERT_NE(nullptr, staticMeta);
|
||||
ASSERT_NE(nullptr, staticMeta);
|
||||
});
|
||||
ASSERT_TRUE(ret.isOk());
|
||||
|
||||
|
||||
@@ -365,7 +365,10 @@
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hardware.radio.config</name>
|
||||
<version>1.2</version>
|
||||
<!--
|
||||
See compatibility_matrix.4.xml on versioning of radio config HAL.
|
||||
-->
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IRadioConfig</name>
|
||||
<instance>default</instance>
|
||||
|
||||
@@ -683,11 +683,16 @@ void SensorsHidlTest::runFlushTest(const std::vector<SensorInfo>& sensors, bool
|
||||
Result flushResult = flush(sensor.sensorHandle);
|
||||
ASSERT_EQ(flushResult, expectedResponse);
|
||||
}
|
||||
activate(sensor.sensorHandle, false);
|
||||
}
|
||||
|
||||
// Wait up to one second for the flush events
|
||||
callback.waitForFlushEvents(sensors, flushCalls, 1000 /* timeoutMs */);
|
||||
|
||||
// Deactivate all sensors after waiting for flush events so pending flush events are not
|
||||
// abandoned by the HAL.
|
||||
for (const SensorInfo& sensor : sensors) {
|
||||
activate(sensor.sensorHandle, false);
|
||||
}
|
||||
getEnvironment()->unregisterCallback();
|
||||
|
||||
// Check that the correct number of flushes are present for each sensor
|
||||
|
||||
Reference in New Issue
Block a user