|
|
@ -1255,8 +1255,8 @@ public class Camera2Engine extends CameraEngine implements ImageReader.OnImageAv |
|
|
|
private void onAutoFocusCapture(@NonNull CaptureResult result) { |
|
|
|
private void onAutoFocusCapture(@NonNull CaptureResult result) { |
|
|
|
Integer afState = result.get(CaptureResult.CONTROL_AF_STATE); |
|
|
|
Integer afState = result.get(CaptureResult.CONTROL_AF_STATE); |
|
|
|
if (afState == null) { |
|
|
|
if (afState == null) { |
|
|
|
LOG.e("onAutoFocusCapture", "afState is null! Assuming AF failed."); |
|
|
|
LOG.i("onAutoFocusCapture", "afState is null! This can happen for partial results. Waiting."); |
|
|
|
afState = CaptureResult.CONTROL_AF_STATE_NOT_FOCUSED_LOCKED; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
switch (afState) { |
|
|
|
switch (afState) { |
|
|
|
case CaptureRequest.CONTROL_AF_STATE_FOCUSED_LOCKED: { |
|
|
|
case CaptureRequest.CONTROL_AF_STATE_FOCUSED_LOCKED: { |
|
|
|