Prevent crash

This commit is contained in:
M66B 2022-01-02 09:03:29 +01:00
parent 9b4c49099b
commit 2ed79b7d7e
1 changed files with 4 additions and 2 deletions

View File

@ -391,9 +391,11 @@ public class FixedTextView extends AppCompatTextView {
if (selected instanceof Spanned) {
String html = HtmlHelper.toHtml((Spanned) selected, context);
cbm.setPrimaryClip(ClipData.newHtmlText(context.getString(R.string.app_name), selected, html));
if (getText() instanceof Spannable)
if (getText() instanceof Spannable) {
Selection.removeSelection((Spannable) getText());
return false;
return true;
} else
return false;
}
}
}