Browse Source

followup prev

master
Sander van Grieken 2 years ago
parent
commit
d12ce00417
No known key found for this signature in database
GPG Key ID: 9BCF8209EA402EBA
  1. 2
      electrum/gui/qml/java_classes/org/electrum/qr/SimpleScannerActivity.java

2
electrum/gui/qml/java_classes/org/electrum/qr/SimpleScannerActivity.java

@ -58,7 +58,7 @@ public class SimpleScannerActivity extends Activity implements ZXingScannerView.
ClipData.Item item = clipboard.getPrimaryClip().getItemAt(0); ClipData.Item item = clipboard.getPrimaryClip().getItemAt(0);
String clipboardText = item.getText().toString(); String clipboardText = item.getText().toString();
// limit size of content. avoid https://developer.android.com/reference/android/os/TransactionTooLargeException.html // limit size of content. avoid https://developer.android.com/reference/android/os/TransactionTooLargeException.html
if (clipboardText.length() > 512 * 1024 * 1024) { if (clipboardText.length() > 512 * 1024) {
Toast.makeText(SimpleScannerActivity.this, "Clipboard contents too large.", Toast.LENGTH_SHORT).show(); Toast.makeText(SimpleScannerActivity.this, "Clipboard contents too large.", Toast.LENGTH_SHORT).show();
} }
SimpleScannerActivity.this.setResultAndClose(clipboardText); SimpleScannerActivity.this.setResultAndClose(clipboardText);

Loading…
Cancel
Save