diff options
author | zhuw <zhuw@codeaurora.org> | 2019-01-22 18:28:00 +0800 |
---|---|---|
committer | zhuw <zhuw@codeaurora.org> | 2019-01-22 18:28:00 +0800 |
commit | 1a2d5703592ff824c4aee30253b4923d38061143 (patch) | |
tree | 53d608ccaefc74d0faf00b3538dfbf0bf1527f6c /src/com/android/camera | |
parent | d1526c95203c23dcc6ff0b02d5e0406575d75b11 (diff) | |
download | android_packages_apps_Snap-1a2d5703592ff824c4aee30253b4923d38061143.tar.gz android_packages_apps_Snap-1a2d5703592ff824c4aee30253b4923d38061143.tar.bz2 android_packages_apps_Snap-1a2d5703592ff824c4aee30253b4923d38061143.zip |
fix Macro Auto Focus mode is not working
APP will trigger TAF with one request.
Then repeating with AUTO mode no matter which option is selected
But APP will repeating selected af mode after 5sec later(time out).
Change-Id: Ibbd8ccef54d87421d9aacfacefc0e07fa506843c
CRs-Fixed:2379642
Diffstat (limited to 'src/com/android/camera')
-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, |