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

Commit 4e331a78 authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "Tapping on paste popup with an empty clipboard does not crash in TextView."

parents 5300f278 e1c14e6a
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -8042,10 +8042,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener

        @Override
        public void onClick(View v) {
            if (canPaste()) {
                ClipboardManager clipboard =
                    (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
                paste(clipboard, getSelectionStart(), getSelectionEnd());
            }
            hide();
        }

        void positionAtCursor() {
            final int offset = TextView.this.getSelectionStart();