diff options
author | Iliyan Malchev <malchev@google.com> | 2011-11-16 22:18:26 -0600 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-11-17 11:45:29 -0800 |
commit | 78dac813ae2c442dd0669db208abd3720d0ea6c4 (patch) | |
tree | 9665b17816fe62452938c68e8a4b2c756932b37a /camera/inc | |
parent | 05ea07dfe04d915b4288d3e71afbf70f8082fea4 (diff) | |
download | hardware_ti_omap4xxx-78dac813ae2c442dd0669db208abd3720d0ea6c4.zip hardware_ti_omap4xxx-78dac813ae2c442dd0669db208abd3720d0ea6c4.tar.gz hardware_ti_omap4xxx-78dac813ae2c442dd0669db208abd3720d0ea6c4.tar.bz2 |
CameraHAL: Do not return error if AF fails
Fixes b/5612881
Some third-party apps do not handle errors thrown by the camera HAL when they
try to invoke autoFocus while AF is in progress.
The Barcode Scanner, in particular, will quit in this case without releasing
the Camera handle, wreaking all sorts of power-management havoc.
Even though CTS does not mandate it, previous versions of Android and other
camera HAL implementations simply return success in this case. This patch
makes this HAL conform to this behavior.
Change-Id: I758e2de7f84b61043267f052169068b64d75d0d1
Signed-off-by: Sundar Raman <sunds@ti.com>
Diffstat (limited to 'camera/inc')
-rw-r--r-- | camera/inc/CameraHal.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/camera/inc/CameraHal.h b/camera/inc/CameraHal.h index f33515a..d139c9c 100644 --- a/camera/inc/CameraHal.h +++ b/camera/inc/CameraHal.h @@ -833,6 +833,12 @@ public: // Rolls the state machine back to INTIALIZED_STATE from the current state virtual status_t rollbackToInitializedState() = 0; + + // Retrieves the current Adapter state - for internal use (not locked) + virtual status_t getState(AdapterState &state) = 0; + // Retrieves the next Adapter state - for internal use (not locked) + virtual status_t getNextState(AdapterState &state) = 0; + protected: //The first two methods will try to switch the adapter state. //Every call to setState() should be followed by a corresponding @@ -841,11 +847,6 @@ protected: virtual status_t setState(CameraCommands operation) = 0; virtual status_t commitState() = 0; virtual status_t rollbackState() = 0; - - // Retrieves the current Adapter state - for internal use (not locked) - virtual status_t getState(AdapterState &state) = 0; - // Retrieves the next Adapter state - for internal use (not locked) - virtual status_t getNextState(AdapterState &state) = 0; }; class DisplayAdapter : public BufferProvider, public virtual RefBase |