Camera: Restructure default camera.provider 2.4

To allow for implementation inheritance of @2.4 legacy wrapper and
@2.4 external webcamera HALs in the @2.5 implementations, restructure
the existing default provider to separate the service interface into a
thin shim that calls the implementations.

Test: Camera starts as usual after refactor, VTS tests pass
Bug: 121379978
Change-Id: Id40790ed4fb495577fd2b885c706b2ed7a96d64e
This commit is contained in:
Eino-Ville Talvala
2019-01-18 17:32:06 -08:00
parent 918a7de8d5
commit 2951804146
11 changed files with 420 additions and 152 deletions

View File

@@ -462,6 +462,17 @@ int CameraModule::isStreamCombinationSupported(int cameraId, camera_stream_combi
return res;
}
void CameraModule::notifyDeviceStateChange(uint64_t deviceState) {
if (getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_5 &&
mModule->notify_device_state_change != NULL) {
ATRACE_BEGIN("camera_module->notify_device_state_change");
ALOGI("%s: calling notify_device_state_change with state %" PRId64, __FUNCTION__,
deviceState);
mModule->notify_device_state_change(deviceState);
ATRACE_END();
}
}
status_t CameraModule::filterOpenErrorCode(status_t err) {
switch(err) {
case NO_ERROR: