From c9cd2f1a644ad852ddb5dba921e7d4675a2ca78e Mon Sep 17 00:00:00 2001 From: Kerong Sui Date: Wed, 18 Sep 2013 15:51:15 +0800 Subject: Camera: Do not create start preview thread if one thread is alive It will have exception if two same thread tried to manipulate same UI component, check the thread status before create a new one. Change-Id: I6f9a5c03f46360d15fdcebcd52c48b924f5b42ad CRs-fixed: 545574 --- src/com/android/camera/VideoModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index e03b6cf1f..e606d17d6 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -797,7 +797,7 @@ public class VideoModule implements CameraModule, showVideoSnapshotUI(false); - if (!mPreviewing) { + if (!mPreviewing && mStartPreviewThread == null) { resetEffect(); openCamera(); if (mActivity.mOpenCameraFail) { -- cgit v1.2.3