summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorweijiew <weijiew@codeaurora.org>2016-11-24 16:26:02 +0800
committerDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2017-05-30 18:10:48 +0000
commit09a7a0b4e347a08335c086a8de48e938e56d919c (patch)
tree03104e20ffc7f4e8296c110a8ddbda7e97ca158d
parent018fdd0c54ddd98eb6e5f5a60a29e6fc350c5040 (diff)
downloadandroid_packages_apps_Snap-09a7a0b4e347a08335c086a8de48e938e56d919c.zip
android_packages_apps_Snap-09a7a0b4e347a08335c086a8de48e938e56d919c.tar.gz
android_packages_apps_Snap-09a7a0b4e347a08335c086a8de48e938e56d919c.tar.bz2
SnapdragonCamera: Camera2 force close after focused
Handler message leaks the camera id, the camera id is set to 0 when handleing Message.As we known, rear camera id is 0 and front camera id is 1. Focus action runs normall when switching to rear camera, but focus action will lead to force close when switching to fornt camera. Change-Id: I7795b7cd0c34c256d1ad0066d13a51ed54cec67d CRs-Fixed: 1094009
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 51913f9..f56fe6f 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1081,6 +1081,7 @@ public class CaptureModule extends BaseModule<CaptureUI> implements PhotoControl
setAFModeToPreview(id, mControlAFMode);
Message message = mCameraHandler.obtainMessage(
CANCEL_TOUCH_FOCUS, Integer.valueOf(mCameraId[id]), 0);
+ message.arg1 = id;
mCameraHandler.sendMessageDelayed(message, CANCEL_TOUCH_FOCUS_DELAY);
} catch (CameraAccessException e) {
e.printStackTrace();