mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Look out for early preview frame before complete configuration
git-svn-id: https://zxing.googlecode.com/svn/trunk@2273 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
7825e5bb49
commit
9a94f713db
|
@ -43,13 +43,13 @@ final class PreviewCallback implements Camera.PreviewCallback {
|
|||
public void onPreviewFrame(byte[] data, Camera camera) {
|
||||
Point cameraResolution = configManager.getCameraResolution();
|
||||
Handler thePreviewHandler = previewHandler;
|
||||
if (thePreviewHandler != null) {
|
||||
if (cameraResolution != null && thePreviewHandler != null) {
|
||||
Message message = thePreviewHandler.obtainMessage(previewMessage, cameraResolution.x,
|
||||
cameraResolution.y, data);
|
||||
message.sendToTarget();
|
||||
previewHandler = null;
|
||||
} else {
|
||||
Log.d(TAG, "Got preview callback, but no handler for it");
|
||||
Log.d(TAG, "Got preview callback, but no handler or resolution available");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue