mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Fixed edit text plain
This commit is contained in:
@@ -45,11 +45,12 @@ public class EditTextPlain extends FixedEditText {
|
||||
ClipboardManager cbm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (cbm != null && cbm.hasPrimaryClip()) {
|
||||
ClipData data = cbm.getPrimaryClip();
|
||||
ClipData.Item item = data.getItemAt(0);
|
||||
|
||||
CharSequence text = item.coerceToText(context);
|
||||
data = ClipData.newPlainText("coerced_plain_text", text);
|
||||
cbm.setPrimaryClip(data);
|
||||
ClipData.Item item = (data == null ? null : data.getItemAt(0));
|
||||
CharSequence text = (item == null ? null : item.coerceToText(context));
|
||||
if (text != null) {
|
||||
data = ClipData.newPlainText("coerced_plain_text", text.toString());
|
||||
cbm.setPrimaryClip(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user