Skip to content

Commit

Permalink
Prevent overexposure issue by not reacting with a still picture captu…
Browse files Browse the repository at this point in the history
…ring on CONTROL_AE_STATE_FLASH_REQUIRED

See: flutter/flutter#88070
  • Loading branch information
gerken-tss committed Nov 17, 2022
1 parent e500884 commit bd8d725
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -118,8 +118,7 @@ private void process(CaptureResult result) {
// CONTROL_AE_STATE can be null on some devices
if (aeState == null
|| aeState == CaptureResult.CONTROL_AE_STATE_CONVERGED
|| aeState == CaptureResult.CONTROL_AE_STATE_PRECAPTURE
|| aeState == CaptureResult.CONTROL_AE_STATE_FLASH_REQUIRED) {
|| aeState == CaptureResult.CONTROL_AE_STATE_PRECAPTURE) {
setCameraState(CameraState.STATE_WAITING_PRECAPTURE_DONE);
} else if (captureTimeouts.getPreCaptureMetering().getIsExpired()) {
Log.w(TAG, "Metering timeout waiting for pre-capture to start, moving on with capture");
Expand Down
Expand Up @@ -289,7 +289,7 @@ private static void setUpWaitingPreCaptureStartTests(TestSuite suite) {
put(CaptureResult.CONTROL_AE_STATE_LOCKED, CameraState.STATE_WAITING_PRECAPTURE_START);
put(
CaptureResult.CONTROL_AE_STATE_FLASH_REQUIRED,
CameraState.STATE_WAITING_PRECAPTURE_DONE);
CameraState.CONTROL_AE_STATE_FLASH_REQUIRED);
put(
CaptureResult.CONTROL_AE_STATE_PRECAPTURE,
CameraState.STATE_WAITING_PRECAPTURE_DONE);
Expand Down

0 comments on commit bd8d725

Please sign in to comment.