From c29687dc0ba56c4e245c8b987197a43d0f18d19e Mon Sep 17 00:00:00 2001 From: jiaoyuan <jiaoyuan@codeaurora.org> Date: Thu, 18 Jun 2020 16:14:35 +0800 Subject: [PATCH] Snapcam: do not take picture when shutter button disable do not take picture when shutter button disable Change-Id: I9d90c339e0ad95138b0da567fa249a8f6752ae0f --- src/com/android/camera/CaptureModule.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 2cd470ebc..f0dbcb52d 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -3224,7 +3224,6 @@ public class CaptureModule implements CameraModule, PhotoController, CaptureFailure result) { Log.d(TAG, "captureStillPictureForCommon onCaptureFailed: " + id); enableShutterAndVideoOnUiThread(id, true); - setCameraModeSwitcherAllowed(true); } @Override @@ -3719,6 +3718,10 @@ public class CaptureModule implements CameraModule, PhotoController, public void unlockFocus(int id) { Log.d(TAG, "unlockFocus " + id); isFlashRequiredInDriver = false; + if ((mCurrentSceneMode.mode == CameraMode.HFR) && isHighSpeedRateCapture()) { + Log.d(TAG, "unlockFocus should not be triggered in HFR"); + return; + } if (!checkSessionAndBuilder(mCaptureSession[id], mPreviewRequestBuilder[id])) { return; } @@ -6929,6 +6932,9 @@ public class CaptureModule implements CameraModule, PhotoController, } return; } + if (!mUI.isShutterEnabled()) { + return; + } setCameraModeSwitcherAllowed(false); Log.d(TAG,"onShutterButtonClick"); String timer = mSettingsManager.getValue(SettingsManager.KEY_TIMER); -- GitLab