mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Work around a weird NPE inside the clipboard library
git-svn-id: https://zxing.googlecode.com/svn/trunk@2539 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
126f33815e
commit
69167c6bdc
|
@ -556,7 +556,12 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
if (copyToClipboard && !resultHandler.areContentsSecure()) {
|
||||
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
|
||||
if (displayContents != null) {
|
||||
clipboard.setText(displayContents);
|
||||
try {
|
||||
clipboard.setText(displayContents);
|
||||
} catch (NullPointerException npe) {
|
||||
// Some kind of bug inside the clipboard implementation, not due to null input
|
||||
Log.w(TAG, "Clipboard bug", npe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue