Added debug option paste as plain text

This commit is contained in:
M66B
2024-02-13 18:59:13 +01:00
parent 4f1fcadeb5
commit b29ff4c0d6
4 changed files with 28 additions and 3 deletions

View File

@@ -290,8 +290,11 @@ public class EditTextCompose extends FixedEditText {
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
try {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
boolean paste_plain = prefs.getBoolean("paste_plain", false);
int order = 1000;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O || paste_plain)
menu.add(Menu.CATEGORY_SECONDARY, android.R.id.pasteAsPlainText, order++, getTitle(R.string.title_paste_plain));
if (undo_manager && can(android.R.id.undo))
menu.add(Menu.CATEGORY_SECONDARY, R.string.title_undo, order++, getTitle(R.string.title_undo));