summaryrefslogtreecommitdiffstats
path: root/core/java/android/text/method
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2010-08-24 15:11:30 -0700
committerGilles Debunne <debunne@google.com>2010-08-24 15:14:12 -0700
commit925f2f909649dd0cbf93674201430879c2e03f99 (patch)
treeb747e4bc6aeb84afee9102faaf23577ee0879068 /core/java/android/text/method
parent0e30200ed112388110c33fdf3fa6fa0e6d2b953a (diff)
parent9765b2a01d32ea6f2f955170ef7d0185e2252b0a (diff)
downloadframeworks_base-925f2f909649dd0cbf93674201430879c2e03f99.zip
frameworks_base-925f2f909649dd0cbf93674201430879c2e03f99.tar.gz
frameworks_base-925f2f909649dd0cbf93674201430879c2e03f99.tar.bz2
resolved conflicts for merge of 9765b2a0 to master
Change-Id: Ic37a443fff0425e9d7c8395f71665d56c38d7e53
Diffstat (limited to 'core/java/android/text/method')
-rw-r--r--core/java/android/text/method/ArrowKeyMovementMethod.java20
1 files changed, 2 insertions, 18 deletions
diff --git a/core/java/android/text/method/ArrowKeyMovementMethod.java b/core/java/android/text/method/ArrowKeyMovementMethod.java
index baaf39d..3fe14f9 100644
--- a/core/java/android/text/method/ArrowKeyMovementMethod.java
+++ b/core/java/android/text/method/ArrowKeyMovementMethod.java
@@ -319,25 +319,9 @@ public class ArrowKeyMovementMethod implements MovementMethod {
public void onTakeFocus(TextView view, Spannable text, int dir) {
if ((dir & (View.FOCUS_FORWARD | View.FOCUS_DOWN)) != 0) {
- Layout layout = view.getLayout();
-
- if (layout == null) {
- /*
- * This shouldn't be null, but do something sensible if it is.
- */
+ if (view.getLayout() == null) {
+ // This shouldn't be null, but do something sensible if it is.
Selection.setSelection(text, text.length());
- } else {
- /*
- * Put the cursor at the end of the first line, which is
- * either the last offset if there is only one line, or the
- * offset before the first character of the second line
- * if there is more than one line.
- */
- if (layout.getLineCount() == 1) {
- Selection.setSelection(text, text.length());
- } else {
- Selection.setSelection(text, layout.getLineStart(1) - 1);
- }
}
} else {
Selection.setSelection(text, text.length());