1
0

followup prev

This commit is contained in:
Sander van Grieken
2024-02-21 11:28:42 +01:00
parent 6d2dfc9759
commit d12ce00417

View File

@@ -58,7 +58,7 @@ public class SimpleScannerActivity extends Activity implements ZXingScannerView.
ClipData.Item item = clipboard.getPrimaryClip().getItemAt(0);
String clipboardText = item.getText().toString();
// 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();
}
SimpleScannerActivity.this.setResultAndClose(clipboardText);