diff options
| author | zhuw <zhuw@codeaurora.org> | 2018-01-19 17:39:53 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-01-23 18:54:46 -0800 |
| commit | 0a63d45d234b0bb57a04a79db2fa112cbce507a0 (patch) | |
| tree | 8c67704aed690831b82a72f5d81187159e12c4d4 /src/com/android/camera/CaptureModule.java | |
| parent | 641449860624f908d33859e4c903ebf620786afd (diff) | |
SDcamera: Fix CAF when take picture in manual promode
cancel focus and set control.af.mode to OFF
Change-Id: I2d64052a0853a95b93c0a497b422525cf36824f5
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
| -rwxr-xr-x | src/com/android/camera/CaptureModule.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 2c308621b..3f5e5e77d 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -1411,7 +1411,11 @@ public class CaptureModule implements CameraModule, PhotoController, if (takeZSLPicture(BAYER_ID)) { return; } - lockFocus(BAYER_ID); + if (mUI.getCurrentProMode() == ProMode.MANUAL_MODE) { + captureStillPicture(BAYER_ID); + } else { + lockFocus(BAYER_ID); + } break; case MONO_MODE: lockFocus(MONO_ID); @@ -1651,7 +1655,8 @@ public class CaptureModule implements CameraModule, PhotoController, } CaptureRequest.Builder captureBuilder = - mCameraDevice[id].createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE); + mCameraDevice[id].createCaptureRequest(mUI.getCurrentProMode() == ProMode.MANUAL_MODE ? + CameraDevice.TEMPLATE_MANUAL : CameraDevice.TEMPLATE_STILL_CAPTURE); if(mSettingsManager.isZSLInHALEnabled()) { captureBuilder.set(CaptureRequest.CONTROL_ENABLE_ZSL, true); @@ -1667,6 +1672,11 @@ public class CaptureModule implements CameraModule, PhotoController, } VendorTagUtil.setCdsMode(captureBuilder, 2);// CDS 0-OFF, 1-ON, 2-AUTO applySettingsForCapture(captureBuilder, id); + if (mUI.getCurrentProMode() == ProMode.MANUAL_MODE) { + float value = mSettingsManager.getFocusValue(SettingsManager.KEY_FOCUS_DISTANCE); + applyFocusDistance(captureBuilder, String.valueOf(value)); + captureBuilder.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_OFF); + } if(isClearSightOn()) { captureStillPictureForClearSight(id); |
