aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/compat
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-12-04 23:50:12 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-12-04 23:50:12 -0800
commit1da4a94293fc3c23c81aa408a62eab209f609d1c (patch)
tree365b3d0dcfa4ef6638a8986573819cd76980c9c4 /java/src/com/android/inputmethod/compat
parent5180614128b5aac770453d57f2f851d632b568be (diff)
parente5db3871b1269703e5ef360090fb35f50ae57ed4 (diff)
downloadlatinime-1da4a94293fc3c23c81aa408a62eab209f609d1c.tar.gz
latinime-1da4a94293fc3c23c81aa408a62eab209f609d1c.tar.xz
latinime-1da4a94293fc3c23c81aa408a62eab209f609d1c.zip
am e5db3871: Fix a field value for the suggestion max size Bug: 5574747
* commit 'e5db3871b1269703e5ef360090fb35f50ae57ed4': Fix a field value for the suggestion max size Bug: 5574747
Diffstat (limited to 'java/src/com/android/inputmethod/compat')
-rw-r--r--java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
index 164d2b748..161ef09b8 100644
--- a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
+++ b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
@@ -51,7 +51,7 @@ public class SuggestionSpanUtils {
public static final Field FIELD_FLAG_AUTO_CORRECTION
= CompatUtils.getField(CLASS_SuggestionSpan, "FLAG_AUTO_CORRECTION");
public static final Field FIELD_SUGGESTION_MAX_SIZE
- = CompatUtils.getField(CLASS_SuggestionSpan, "SUGGESTION_MAX_SIZE");
+ = CompatUtils.getField(CLASS_SuggestionSpan, "SUGGESTIONS_MAX_SIZE");
public static final Integer OBJ_FLAG_AUTO_CORRECTION = (Integer) CompatUtils
.getFieldValue(null, null, FIELD_FLAG_AUTO_CORRECTION);;
public static final Integer OBJ_SUGGESTION_MAX_SIZE = (Integer) CompatUtils
@@ -63,7 +63,7 @@ public class SuggestionSpanUtils {
if (LatinImeLogger.sDBG) {
if (SUGGESTION_SPAN_IS_SUPPORTED
&& (OBJ_FLAG_AUTO_CORRECTION == null || OBJ_SUGGESTION_MAX_SIZE == null)) {
- Log.e(TAG, "Field is accidentially null.");
+ throw new RuntimeException("Field is accidentially null.");
}
}
}
@@ -71,7 +71,7 @@ public class SuggestionSpanUtils {
public static CharSequence getTextWithAutoCorrectionIndicatorUnderline(
Context context, CharSequence text) {
if (TextUtils.isEmpty(text) || CONSTRUCTOR_SuggestionSpan == null
- || OBJ_FLAG_AUTO_CORRECTION == null) {
+ || OBJ_FLAG_AUTO_CORRECTION == null || OBJ_SUGGESTION_MAX_SIZE == null) {
return text;
}
final Spannable spannable = text instanceof Spannable