diff options
author | 2013-01-06 11:10:27 +0900 | |
---|---|---|
committer | 2013-01-07 12:13:42 +0900 | |
commit | b6ca354431367b625daf9fff5fbe4b1f5ef996ab (patch) | |
tree | 1358c683e123161cc04bc6ad83eb75c763ec53b3 /java/src/com/android/inputmethod/latin/UserBinaryDictionary.java | |
parent | f677681330143e3e50871222d33ade594e6348ce (diff) | |
download | latinime-b6ca354431367b625daf9fff5fbe4b1f5ef996ab.tar.gz latinime-b6ca354431367b625daf9fff5fbe4b1f5ef996ab.tar.xz latinime-b6ca354431367b625daf9fff5fbe4b1f5ef996ab.zip |
Small code cleanups
Multi-project commit with I249d5fbe
Change-Id: Ia28c4e970992aa1299a30e604eaa5d096655c3a5
Diffstat (limited to 'java/src/com/android/inputmethod/latin/UserBinaryDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/UserBinaryDictionary.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java index ddae5ac48..6cb39426d 100644 --- a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java @@ -24,6 +24,7 @@ import android.content.Intent; import android.database.ContentObserver; import android.database.Cursor; import android.net.Uri; +import android.os.Build; import android.provider.UserDictionary.Words; import android.text.TextUtils; @@ -43,8 +44,7 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary { final static String SHORTCUT = "shortcut"; private static final String[] PROJECTION_QUERY; static { - // 16 is JellyBean, but we want this to compile against ICS. - if (android.os.Build.VERSION.SDK_INT >= 16) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { PROJECTION_QUERY = new String[] { Words.WORD, SHORTCUT, @@ -90,13 +90,14 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary { mObserver = new ContentObserver(null) { @Override public void onChange(final boolean self) { - // This hook is deprecated as of API level 16, but should still be supported for - // cases where the IME is running on an older version of the platform. + // This hook is deprecated as of API level 16 (Build.VERSION_CODES.JELLY_BEAN), + // but should still be supported for cases where the IME is running on an older + // version of the platform. onChange(self, null); } - // The following hook is only available as of API level 16, and as such it will only - // work on JellyBean+ devices. On older versions of the platform, the hook - // above will be called instead. + // The following hook is only available as of API level 16 + // (Build.VERSION_CODES.JELLY_BEAN), and as such it will only work on JellyBean+ + // devices. On older versions of the platform, the hook above will be called instead. @Override public void onChange(final boolean self, final Uri uri) { setRequiresReload(true); @@ -233,8 +234,7 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary { } private void addWords(final Cursor cursor) { - // 16 is JellyBean, but we want this to compile against ICS. - final boolean hasShortcutColumn = android.os.Build.VERSION.SDK_INT >= 16; + final boolean hasShortcutColumn = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; clearFusionDictionary(); if (cursor == null) return; if (cursor.moveToFirst()) { |