diff options
Diffstat (limited to 'java/src/com/android/inputmethod/compat')
-rw-r--r-- | java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java index e8be88759..b9ea9358d 100644 --- a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java +++ b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java @@ -33,6 +33,11 @@ public class SuggestionSpanUtils { }; private static final Constructor<?> CONSTRUCTOR_SuggestionSpan = CompatUtils.getConstructor(CLASS_SuggestionSpan, INPUT_TYPE_SuggestionSpan); + public static final boolean SUGGESTION_SPAN_IS_SUPPORTED; + static { + SUGGESTION_SPAN_IS_SUPPORTED = CLASS_SuggestionSpan != null + && CONSTRUCTOR_SuggestionSpan != null; + } public static CharSequence getTextWithSuggestionSpan( Context context, CharSequence suggestion, SuggestedWords suggestedWords) { |