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

Commit 1a9fcfb7 authored by Gilles Debunne's avatar Gilles Debunne Committed by The Android Automerger
Browse files

Bug 5166707: NPE fixed in getFocusedRect

Change-Id: I1e59ac739f1258c0047a667443f80b2c09ffa12c
parent 4f491cbe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4788,8 +4788,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            selEnd = getSelectionEnd();

            if (selStart >= 0) {
                if (mHighlightPath == null)
                    mHighlightPath = new Path();
                if (mHighlightPath == null) mHighlightPath = new Path();

                if (selStart == selEnd) {
                    if (isCursorVisible() &&
@@ -4995,6 +4994,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            } else {
                // Selection extends across multiple lines -- the focused
                // rect covers the entire width.
                if (mHighlightPath == null) mHighlightPath = new Path();
                if (mHighlightPathBogus) {
                    mHighlightPath.reset();
                    mLayout.getSelectionPath(selStart, selEnd, mHighlightPath);