mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue 1236 let history answer an Intent
git-svn-id: https://zxing.googlecode.com/svn/trunk@2250 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
41c4e34063
commit
9a33192652
|
@ -442,13 +442,11 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
lastResult = rawResult;
|
lastResult = rawResult;
|
||||||
ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);
|
ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);
|
||||||
historyManager.addHistoryItem(rawResult, resultHandler);
|
historyManager.addHistoryItem(rawResult, resultHandler);
|
||||||
|
|
||||||
if (barcode == null) {
|
|
||||||
// This is from history -- no saved barcode
|
|
||||||
handleDecodeInternally(rawResult, resultHandler, null);
|
|
||||||
} else {
|
|
||||||
beepManager.playBeepSoundAndVibrate();
|
beepManager.playBeepSoundAndVibrate();
|
||||||
|
|
||||||
|
if (barcode != null) {
|
||||||
drawResultPoints(barcode, rawResult);
|
drawResultPoints(barcode, rawResult);
|
||||||
|
}
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case NATIVE_APP_INTENT:
|
case NATIVE_APP_INTENT:
|
||||||
case PRODUCT_SEARCH_LINK:
|
case PRODUCT_SEARCH_LINK:
|
||||||
|
@ -475,7 +473,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Superimpose a line for 1D or dots for 2D to highlight the key features of the barcode.
|
* Superimpose a line for 1D or dots for 2D to highlight the key features of the barcode.
|
||||||
|
@ -604,7 +601,10 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
|
|
||||||
// Briefly show the contents of the barcode, then handle the result outside Barcode Scanner.
|
// Briefly show the contents of the barcode, then handle the result outside Barcode Scanner.
|
||||||
private void handleDecodeExternally(Result rawResult, ResultHandler resultHandler, Bitmap barcode) {
|
private void handleDecodeExternally(Result rawResult, ResultHandler resultHandler, Bitmap barcode) {
|
||||||
|
|
||||||
|
if (barcode != null) {
|
||||||
viewfinderView.drawResultBitmap(barcode);
|
viewfinderView.drawResultBitmap(barcode);
|
||||||
|
}
|
||||||
|
|
||||||
// Since this message will only be shown for a second, just tell the user what kind of
|
// Since this message will only be shown for a second, just tell the user what kind of
|
||||||
// barcode was found (e.g. contact info) rather than the full contents, which they won't
|
// barcode was found (e.g. contact info) rather than the full contents, which they won't
|
||||||
|
|
Loading…
Reference in a new issue