aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/compat
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/compat')
-rw-r--r--java/src/com/android/inputmethod/compat/IntentCompatUtils.java9
-rw-r--r--java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java6
2 files changed, 6 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/compat/IntentCompatUtils.java b/java/src/com/android/inputmethod/compat/IntentCompatUtils.java
index df2e22fe8..965a2a891 100644
--- a/java/src/com/android/inputmethod/compat/IntentCompatUtils.java
+++ b/java/src/com/android/inputmethod/compat/IntentCompatUtils.java
@@ -21,16 +21,15 @@ import android.content.Intent;
public final class IntentCompatUtils {
// Note that Intent.ACTION_USER_INITIALIZE have been introduced in API level 17
// (Build.VERSION_CODE.JELLY_BEAN_MR1).
- public static final String ACTION_USER_INITIALIZE =
- (String)CompatUtils.getFieldValue(null, null,
+ private static final String ACTION_USER_INITIALIZE =
+ (String)CompatUtils.getFieldValue(null /* receiver */, null /* defaultValue */,
CompatUtils.getField(Intent.class, "ACTION_USER_INITIALIZE"));
private IntentCompatUtils() {
// This utility class is not publicly instantiable.
}
- public static boolean has_ACTION_USER_INITIALIZE(final Intent intent) {
- return ACTION_USER_INITIALIZE != null && intent != null
- && ACTION_USER_INITIALIZE.equals(intent.getAction());
+ public static boolean is_ACTION_USER_INITIALIZE(final String action) {
+ return ACTION_USER_INITIALIZE != null && ACTION_USER_INITIALIZE.equals(action);
}
}
diff --git a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
index 141e08a8d..55282c583 100644
--- a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
+++ b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
@@ -23,17 +23,15 @@ import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.SuggestionSpan;
-import com.android.inputmethod.latin.CollectionUtils;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.SuggestionSpanPickedNotificationReceiver;
+import com.android.inputmethod.latin.utils.CollectionUtils;
import java.lang.reflect.Field;
import java.util.ArrayList;
public final class SuggestionSpanUtils {
- private static final String TAG = SuggestionSpanUtils.class.getSimpleName();
-
// Note that SuggestionSpan.FLAG_AUTO_CORRECTION has been introduced
// in API level 15 (Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1).
public static final Field FIELD_FLAG_AUTO_CORRECTION = CompatUtils.getField(
@@ -60,7 +58,7 @@ public final class SuggestionSpanUtils {
}
final Spannable spannable = new SpannableString(text);
final SuggestionSpan suggestionSpan = new SuggestionSpan(context, null /* locale */,
- new String[] {} /* suggestions */, (int)OBJ_FLAG_AUTO_CORRECTION,
+ new String[] {} /* suggestions */, OBJ_FLAG_AUTO_CORRECTION,
SuggestionSpanPickedNotificationReceiver.class);
spannable.setSpan(suggestionSpan, 0, text.length(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING);