summaryrefslogtreecommitdiffstats
path: root/services/camera
diff options
context:
space:
mode:
authorSai Kumar Sanagavarapu <ssanagav@codeaurora.org>2015-12-21 15:51:03 +0530
committerSteve Kondik <steve@cyngn.com>2016-01-08 21:04:24 -0800
commit3fec0e568834dfacb0a10455297c7cddfaeb2f51 (patch)
tree7affcafb08e0b7aabf3844775b89ccd92e3ccba7 /services/camera
parentf8eea5d1502a1d7c2751adb56ff02ce215893d2b (diff)
downloadframeworks_av-3fec0e568834dfacb0a10455297c7cddfaeb2f51.zip
frameworks_av-3fec0e568834dfacb0a10455297c7cddfaeb2f51.tar.gz
frameworks_av-3fec0e568834dfacb0a10455297c7cddfaeb2f51.tar.bz2
cameraservice: Change the error mapping for ERROR_CAMERA_DEVICE.
In case of API1-HAL3, if HAL reports CAMERA3_MSG_ERROR_DEVICE, it is getting mapped to CAMERA_ERROR_UNKNOWN in the service layer. But this particular error code is not handled properly even in applications like GoogleCamera (Android default camera app). For example if camera deamon gets killed when GoogleCamera is previewing, since its not handling the error properly, preview freeze is seen for long time followed by mediaserver crash if any user interaction happens meanwhile. Ideally, app should close gracefully based on the error received. So, map CAMERA3_MSG_ERROR_DEVICE to CAMERA_ERROR_SERVER_DIED, so that app and mediaserver gets closed gracefully. Change-Id: Idad9d23262e28e85b020b5bacdaad7c77fe16372
Diffstat (limited to 'services/camera')
-rw-r--r--services/camera/libcameraservice/api1/Camera2Client.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/api1/Camera2Client.cpp b/services/camera/libcameraservice/api1/Camera2Client.cpp
index 4338d64..1821636 100644
--- a/services/camera/libcameraservice/api1/Camera2Client.cpp
+++ b/services/camera/libcameraservice/api1/Camera2Client.cpp
@@ -1741,8 +1741,6 @@ void Camera2Client::notifyError(ICameraDeviceCallbacks::CameraErrorCode errorCod
err = CAMERA_ERROR_RELEASED;
break;
case ICameraDeviceCallbacks::ERROR_CAMERA_DEVICE:
- err = CAMERA_ERROR_UNKNOWN;
- break;
case ICameraDeviceCallbacks::ERROR_CAMERA_SERVICE:
err = CAMERA_ERROR_SERVER_DIED;
break;