diff options
author | junjiez <junjiez@codeaurora.org> | 2017-02-20 11:01:37 +0800 |
---|---|---|
committer | junjiez <junjiez@codeaurora.org> | 2017-02-20 11:01:37 +0800 |
commit | 56f579cee304da6539605382dda02dcc1e15d007 (patch) | |
tree | 6545a682eab815322cdc3698326bd0306159218b | |
parent | 7ba92496e19033b068849ad7fdc4b944e6c8e57b (diff) | |
download | android_packages_apps_Snap-56f579cee304da6539605382dda02dcc1e15d007.tar.gz android_packages_apps_Snap-56f579cee304da6539605382dda02dcc1e15d007.tar.bz2 android_packages_apps_Snap-56f579cee304da6539605382dda02dcc1e15d007.zip |
SnapdragonCamera: fix focus failture after switch resolution
Need to cancel touch focus when activity paused to avoid
in wrong focus mode in the next lunch.
Change-Id: I8e711b520f3b0f4042ef8af5197c1a4b321b6c0c
CRs-Fixed: 2006407
-rwxr-xr-x[-rw-r--r--] | src/com/android/camera/CaptureModule.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 0a8da719d..51da2d553 100644..100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -2121,6 +2121,7 @@ public class CaptureModule implements CameraModule, PhotoController, @Override public void onPauseBeforeSuper() { + cancelTouchFocus(); mPaused = true; mToast = null; mUI.onPause(); @@ -2171,6 +2172,20 @@ public class CaptureModule implements CameraModule, PhotoController, updatePreviewSurfaceReadyState(false); } + private void cancelTouchFocus() { + if (getCameraMode() == DUAL_MODE) { + if(mState[BAYER_ID] == STATE_WAITING_TOUCH_FOCUS) { + cancelTouchFocus(BAYER_ID); + } else if (mState[MONO_ID] == STATE_WAITING_TOUCH_FOCUS) { + cancelTouchFocus(MONO_ID); + } + } else { + if (mState[getMainCameraId()] == STATE_WAITING_TOUCH_FOCUS) { + cancelTouchFocus(getMainCameraId()); + } + } + } + private ArrayList<Integer> getFrameProcFilterId() { ArrayList<Integer> filters = new ArrayList<Integer>(); |