diff options
author | 2011-12-05 07:56:59 -0800 | |
---|---|---|
committer | 2011-12-05 07:56:59 -0800 | |
commit | d93f94f2f9ff96bd0ec4223b75297af4235fe585 (patch) | |
tree | cac2dad84d572fe263e1c63810fad01b08ebebad /java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java | |
parent | c9eacbc452edaac1dfd3e0172bea5fa5361c466e (diff) | |
parent | a3cf232a2a144276509b04bc4b5212f4b8915414 (diff) | |
download | latinime-d93f94f2f9ff96bd0ec4223b75297af4235fe585.tar.gz latinime-d93f94f2f9ff96bd0ec4223b75297af4235fe585.tar.xz latinime-d93f94f2f9ff96bd0ec4223b75297af4235fe585.zip |
am a3cf232a: am e5db3871: Fix a field value for the suggestion max size Bug: 5574747
* commit 'a3cf232a2a144276509b04bc4b5212f4b8915414':
Fix a field value for the suggestion max size Bug: 5574747
Diffstat (limited to 'java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java | 6 |
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 |