am 28795d88: Merge "Fix race condition with preview callback." into jb-dev
* commit '28795d883a34f5393ff00dca0a54aca79b2607d5': Fix race condition with preview callback.
This commit is contained in:
@@ -736,8 +736,8 @@ public class Camera {
|
||||
return;
|
||||
|
||||
case CAMERA_MSG_PREVIEW_FRAME:
|
||||
if (mPreviewCallback != null) {
|
||||
PreviewCallback cb = mPreviewCallback;
|
||||
PreviewCallback pCb = mPreviewCallback;
|
||||
if (pCb != null) {
|
||||
if (mOneShot) {
|
||||
// Clear the callback variable before the callback
|
||||
// in case the app calls setPreviewCallback from
|
||||
@@ -749,7 +749,7 @@ public class Camera {
|
||||
// Set to oneshot mode again.
|
||||
setHasPreviewCallback(true, false);
|
||||
}
|
||||
cb.onPreviewFrame((byte[])msg.obj, mCamera);
|
||||
pCb.onPreviewFrame((byte[])msg.obj, mCamera);
|
||||
}
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user