Commit 2d01b8e2 authored by Senpo Hu's avatar Senpo Hu
Browse files

Overhaul error handling in AndroidCameraAgentImpl.

DispatchThread could throw RTE when timeout (2500 ms). This CL extends
it to 3500 ms and also re-route the exception to the proper exception
callback instead of surfacing that up to the app. Since a lot of try-catch
block is added, CameraExceptionHandler class is added to keep
CameraAgent.java clean.

The portability layer should ensure the proper use of Camera API 1. With
this assumption, any run time exception thrown by the framework should be
considered fatal. Once it happened, CameraAgent/CameraProxy should be
invalidated. Any subsequent camera commands should be gated as no-ops to
prevent HAL hanging symptom. Users should be guided to exit the app and
recover from the camera error.

Design Doc:
https://docs.google.com/a/google.com/document/d/1t0sEPwGgc387XcoCVC7kT9Y_RSZPxcayla03M4bdn0U/edit

Corresponding CL for the app layer: ag/562383

Bug: 16189216
Change-Id: I33e69aeff0c8e4211e82e0e83133915700c4eb8f
parent 90e75d1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment