Skip to content
Snippets Groups Projects
Commit a3916a4a authored by Sai Kumar Sanagavarapu's avatar Sai Kumar Sanagavarapu Committed by Gerrit - the friendly Code Review server
Browse files

SnapdragonCamera: Fix camera double open issue.

If switch camera occurs before open camera thread completes, it
will result in camera double open exception. Hence wait for open
thread and then do switch.

Change-Id: Id12f149a2b850dc7cf1c872cec016c95e604f713
parent d5bb29f7
Branches
No related tags found
No related merge requests found
......@@ -655,6 +655,14 @@ public class PhotoModule
setCameraId(mCameraId);
// from onPause
try {
if (mOpenCameraThread != null) {
mOpenCameraThread.join();
mOpenCameraThread = null;
}
} catch (InterruptedException ex) {
// ignore
}
closeCamera();
mUI.collapseCameraControls();
mUI.clearFaces();
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment