Refactoring

This commit is contained in:
M66B
2022-04-13 22:27:33 +02:00
parent 481ca4d2d0
commit ff3f9df450
49 changed files with 129 additions and 152 deletions

View File

@@ -360,7 +360,7 @@ public class EditTextCompose extends FixedEditText {
}
Context context = getContext();
ClipboardManager cbm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
ClipboardManager cbm = Helper.getSystemService(context, ClipboardManager.class);
if (start != end && cbm != null) {
CharSequence selected = getEditableText().subSequence(start, end);
if (selected instanceof Spanned) {
@@ -373,7 +373,7 @@ public class EditTextCompose extends FixedEditText {
} else if (id == android.R.id.paste) {
final Context context = getContext();
ClipboardManager cbm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
ClipboardManager cbm = Helper.getSystemService(context, ClipboardManager.class);
if (cbm == null || !cbm.hasPrimaryClip())
return false;