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;
|
||||
ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);
|
||||
historyManager.addHistoryItem(rawResult, resultHandler);
|
||||
|
||||
if (barcode == null) {
|
||||
// This is from history -- no saved barcode
|
||||
handleDecodeInternally(rawResult, resultHandler, null);
|
||||
} else {
|
||||
beepManager.playBeepSoundAndVibrate();
|
||||
|
||||
if (barcode != null) {
|
||||
drawResultPoints(barcode, rawResult);
|
||||
}
|
||||
switch (source) {
|
||||
case NATIVE_APP_INTENT:
|
||||
case PRODUCT_SEARCH_LINK:
|
||||
|
@ -475,7 +473,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
private void handleDecodeExternally(Result rawResult, ResultHandler resultHandler, Bitmap barcode) {
|
||||
|
||||
if (barcode != null) {
|
||||
viewfinderView.drawResultBitmap(barcode);
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue