am 8e7e95f2: Merge "Bug 5166707: NPE fixed in getFocusedRect"

* commit '8e7e95f22f700fae6926d87b25c388bf9b509389':
  Bug 5166707: NPE fixed in getFocusedRect
This commit is contained in:
Gilles Debunne
2011-08-25 13:46:32 -07:00
committed by Android Git Automerger

View File

@@ -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);