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

Commit c9471655 authored by Mihai Popa's avatar Mihai Popa
Browse files

[Magnifier-77] Show it on long press selection

Before this CL, the TextView magnifier was shown when selecting text,
but only when a selection handle was explicitly grabbed. This CL also enables
the magnifier when selection is performed by dragging after long press.

Bug: 119819194
Change-Id: I9546023723ef9ff84dbc6ca4c8fe5642c66a0146
Test: manual testing
parent 26ee00dd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -6020,6 +6020,9 @@ public class Editor {
                    }

                    updateSelection(event);
                    if (mTextView.hasSelection() && mEndHandle != null) {
                        mEndHandle.updateMagnifier(event);
                    }
                    break;

                case MotionEvent.ACTION_UP:
@@ -6027,6 +6030,9 @@ public class Editor {
                        break;
                    }
                    updateSelection(event);
                    if (mEndHandle != null) {
                        mEndHandle.dismissMagnifier();
                    }

                    // No longer dragging to select text, let the parent intercept events.
                    mTextView.getParent().requestDisallowInterceptTouchEvent(false);