mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Camera: check return value of callback" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6efdef720f
@@ -393,7 +393,11 @@ void CameraDeviceSession::ResultBatcher::sendBatchShutterCbsLocked(
|
||||
return;
|
||||
}
|
||||
|
||||
mCallback->notify(batch->mShutterMsgs);
|
||||
auto ret = mCallback->notify(batch->mShutterMsgs);
|
||||
if (!ret.isOk()) {
|
||||
ALOGE("%s: notify shutter transaction failed: %s",
|
||||
__FUNCTION__, ret.description().c_str());
|
||||
}
|
||||
batch->mShutterDelivered = true;
|
||||
batch->mShutterMsgs.clear();
|
||||
}
|
||||
@@ -563,7 +567,11 @@ void CameraDeviceSession::ResultBatcher::sendBatchMetadataLocked(
|
||||
}
|
||||
|
||||
void CameraDeviceSession::ResultBatcher::notifySingleMsg(NotifyMsg& msg) {
|
||||
mCallback->notify({msg});
|
||||
auto ret = mCallback->notify({msg});
|
||||
if (!ret.isOk()) {
|
||||
ALOGE("%s: notify transaction failed: %s",
|
||||
__FUNCTION__, ret.description().c_str());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -654,7 +662,11 @@ void CameraDeviceSession::ResultBatcher::invokeProcessCaptureResultCallback(
|
||||
}
|
||||
}
|
||||
}
|
||||
mCallback->processCaptureResult(results);
|
||||
auto ret = mCallback->processCaptureResult(results);
|
||||
if (!ret.isOk()) {
|
||||
ALOGE("%s: processCaptureResult transaction failed: %s",
|
||||
__FUNCTION__, ret.description().c_str());
|
||||
}
|
||||
mProcessCaptureResultLock.unlock();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user