mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Guess at avoiding an NPE reported by a user
git-svn-id: https://zxing.googlecode.com/svn/trunk@1970 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
359551d6e7
commit
27a047ebe2
|
@ -567,10 +567,12 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
} else if (source == Source.ZXING_LINK) {
|
||||
// Replace each occurrence of RETURN_CODE_PLACEHOLDER in the returnUrlTemplate
|
||||
// with the scanned code. This allows both queries and REST-style URLs to work.
|
||||
Message message = Message.obtain(handler, R.id.launch_product_query);
|
||||
message.obj = returnUrlTemplate.replace(RETURN_CODE_PLACEHOLDER,
|
||||
resultHandler.getDisplayContents().toString());
|
||||
handler.sendMessageDelayed(message, INTENT_RESULT_DURATION);
|
||||
if (returnUrlTemplate != null) {
|
||||
Message message = Message.obtain(handler, R.id.launch_product_query);
|
||||
message.obj = returnUrlTemplate.replace(RETURN_CODE_PLACEHOLDER,
|
||||
String.valueOf(resultHandler.getDisplayContents()));
|
||||
handler.sendMessageDelayed(message, INTENT_RESULT_DURATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue