mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Try to avoid another clipboard-related NPE
git-svn-id: https://zxing.googlecode.com/svn/trunk@2564 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
0302080139
commit
0983aec832
|
@ -598,7 +598,12 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
|
||||
CharSequence text = resultHandler.getDisplayContents();
|
||||
if (text != null) {
|
||||
try {
|
||||
clipboard.setText(text);
|
||||
} 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