Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49231f18 authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Don't show AUTOFILL menu when text is selected." into oc-dev

parents 2c1d4f8f 1c1626ec
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -3842,11 +3842,12 @@ public class Editor {
            }

            if (mTextView.canRequestAutofill()) {
                final int mode = mTextView.getText().length() <= 0
                        ? MenuItem.SHOW_AS_ACTION_IF_ROOM : MenuItem.SHOW_AS_ACTION_NEVER;
                final String selected = mTextView.getSelectedText();
                if (selected == null || selected.isEmpty()) {
                    menu.add(Menu.NONE, TextView.ID_AUTOFILL, MENU_ITEM_ORDER_AUTOFILL,
                            com.android.internal.R.string.autofill)
                        .setShowAsAction(mode);
                            .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
                }
            }

            if (mTextView.canPasteAsPlainText()) {