diff options
author | Zhijun He <zhijunhe@google.com> | 2014-09-03 11:36:00 -0700 |
---|---|---|
committer | Zhijun He <zhijunhe@google.com> | 2014-09-03 20:37:50 +0000 |
commit | e8339fb87364469feb1f2cbda92889efecb79a7c (patch) | |
tree | 18ff0acc5d64a64541f5e12c1b3ce01292da9741 /services/camera | |
parent | c2aa6971f7ea685346308d1661f430e1f802cb11 (diff) | |
download | frameworks_av-e8339fb87364469feb1f2cbda92889efecb79a7c.zip frameworks_av-e8339fb87364469feb1f2cbda92889efecb79a7c.tar.gz frameworks_av-e8339fb87364469feb1f2cbda92889efecb79a7c.tar.bz2 |
Camera API1: fix AE state check in precapture state
It is legal to transit to CONVERGED or FLASH_REQUIRED after a AE precapture
trigger.
Bug: 17365185
Change-Id: Id041eff5eac564c32d09b547a0139d24807336f4
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp index cb9aca6..9849f4d 100644 --- a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp +++ b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp @@ -445,11 +445,18 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardPrecaptureWait( if (mNewAEState) { if (!mAeInPrecapture) { // Waiting to see PRECAPTURE state - if (mAETriggerId == mTriggerId && - mAEState == ANDROID_CONTROL_AE_STATE_PRECAPTURE) { - ALOGV("%s: Got precapture start", __FUNCTION__); - mAeInPrecapture = true; - mTimeoutCount = kMaxTimeoutsForPrecaptureEnd; + if (mAETriggerId == mTriggerId) { + if (mAEState == ANDROID_CONTROL_AE_STATE_PRECAPTURE) { + ALOGV("%s: Got precapture start", __FUNCTION__); + mAeInPrecapture = true; + mTimeoutCount = kMaxTimeoutsForPrecaptureEnd; + } else if (mAEState == ANDROID_CONTROL_AE_STATE_CONVERGED || + mAEState == ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED) { + // It is legal to transit to CONVERGED or FLASH_REQUIRED + // directly after a trigger. + ALOGV("%s: AE is already in good state, start capture", __FUNCTION__); + return STANDARD_CAPTURE; + } } } else { // Waiting to see PRECAPTURE state end |