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

Commit fc4604f7 authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

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

am: 49231f18

Change-Id: I5d182201cc568caa894dddd6352cbf6abb83a03b
parents 3f4a368a 49231f18
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()) {