diff options
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index ca445801a..690b93f90 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -1735,8 +1735,6 @@ public class CaptureModule implements CameraModule, PhotoController, if (!checkSessionAndBuilder(mCaptureSession[id], mPreviewRequestBuilder[id])) { return; } - afMode = (mSettingsManager.isDeveloperEnabled() && getDevAfMode() != -1) ? getDevAfMode() - : afMode; if (DEBUG) { Log.d(TAG, "setAFModeToPreview " + afMode); } @@ -2898,8 +2896,10 @@ public class CaptureModule implements CameraModule, PhotoController, if (mSettingsManager.isDeveloperEnabled()) { applyCommonSettings(mPreviewRequestBuilder[id], id); } + int afMode = (mSettingsManager.isDeveloperEnabled() && getDevAfMode() != -1) ? + getDevAfMode() : mControlAFMode; setAFModeToPreview(id, mUI.getCurrentProMode() == ProMode.MANUAL_MODE ? - CaptureRequest.CONTROL_AF_MODE_OFF : mControlAFMode); + CaptureRequest.CONTROL_AF_MODE_OFF : afMode); mTakingPicture[id] = false; enableShutterAndVideoOnUiThread(id); } catch (NullPointerException | IllegalStateException | CameraAccessException e) { @@ -6673,7 +6673,8 @@ public class CaptureModule implements CameraModule, PhotoController, mState[id] = STATE_PREVIEW; mControlAFMode = CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE; mIsAutoFocusStarted = false; - setAFModeToPreview(id, mControlAFMode); + setAFModeToPreview(id, (mSettingsManager.isDeveloperEnabled() && getDevAfMode() != -1) ? + getDevAfMode() : mControlAFMode); } private MeteringRectangle[] afaeRectangle(float x, float y, int width, int height, |