summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-02-09 14:17:22 -0800
committerandroid-merger <android-build@android.com>2011-02-09 18:01:13 -0800
commitb417337486667a47c6e0c8430d4095e182f4aaa0 (patch)
treef6d212fb8c67a6b35da5f23d0b79704645e40179
parentd68621bbd9af2a52b6ac24c9f7aa87b0ab14f630 (diff)
downloadbase-b417337486667a47c6e0c8430d4095e182f4aaa0.tar.gz
Text selection is broken.android-2.3.3_r1aandroid-2.3.3_r1
Bug 3439569 Lazy initialization code was not back-ported. Change-Id: I9815f649891e2ddc602383488749144686ab1dd3
-rw-r--r--core/java/android/widget/TextView.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 0afd5a0222af..05e9678ca675 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -6822,11 +6822,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
public boolean onTouchEvent(MotionEvent event) {
final int action = event.getActionMasked();
- if (mInsertionPointCursorController != null) {
- mInsertionPointCursorController.onTouchEvent(event);
+ if (hasInsertionController()) {
+ getInsertionController().onTouchEvent(event);
}
- if (mSelectionModifierCursorController != null) {
- mSelectionModifierCursorController.onTouchEvent(event);
+ if (hasSelectionController()) {
+ getSelectionController().onTouchEvent(event);
}
if (action == MotionEvent.ACTION_DOWN) {
@@ -7324,9 +7324,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
minOffset = getSelectionStart();
maxOffset = getSelectionEnd();
} else {
- // selectionModifierCursorController is not null at that point
+ // hasSelectionController is true since we canSelectText.
SelectionModifierCursorController selectionModifierCursorController =
- ((SelectionModifierCursorController) mSelectionModifierCursorController);
+ (SelectionModifierCursorController) getSelectionController();
minOffset = selectionModifierCursorController.getMinTouchOffset();
maxOffset = selectionModifierCursorController.getMaxTouchOffset();
}