summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2016-01-21 06:06:49 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-01-21 06:06:49 +0000
commit88f04309806ec9964235e02543c7e2dbd18d6b8a (patch)
treeec4338941ed216d9b9973311c14b579db29136c4
parente09e245b9212b4757793f76cb42d8ef456c9be23 (diff)
parent0445fdf321e74044dc9f3719922fc8ff4923fdf4 (diff)
Merge "Ensure EditorInfo#locales is set before return."
-rw-r--r--core/java/android/widget/TextView.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d46c6f92b762..81ebdb3bd3ff 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -6440,6 +6440,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_ENTER_ACTION;
}
outAttrs.hintText = mHint;
+ // LocaleList is designed to be immutable. This is theoretically equivalent to copy
+ // the snapshot of the current text locales.
+ outAttrs.locales = getTextLocales();
if (mText instanceof Editable) {
InputConnection ic = new EditableInputConnection(this);
outAttrs.initialSelStart = getSelectionStart();
@@ -6447,9 +6450,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
outAttrs.initialCapsMode = ic.getCursorCapsMode(getInputType());
return ic;
}
- // LocaleList is designed to be immutable. This is theoretically equivalent to copy
- // the snapshot of the current text locales.
- outAttrs.locales = getTextLocales();
}
return null;
}