diff --git a/java/src/com/android/inputmethod/compat/BuildCompatUtils.java b/java/src/com/android/inputmethod/compat/BuildCompatUtils.java
new file mode 100644
index 0000000..7d1717b
--- /dev/null
+++ b/java/src/com/android/inputmethod/compat/BuildCompatUtils.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.compat;
+
+import android.os.Build;
+
+public final class BuildCompatUtils {
+    private BuildCompatUtils() {
+        // This utility class is not publicly instantiable.
+    }
+
+    private static final boolean IS_RELEASE_BUILD = Build.VERSION.CODENAME.equals("REL");
+
+    /**
+     * The "effective" API version.
+     * {@link android.os.Build.VERSION#SDK_INT} if the platform is a release build.
+     * {@link android.os.Build.VERSION#SDK_INT} plus 1 if the platform is a development build.
+     */
+    public static final int EFFECTIVE_SDK_INT = IS_RELEASE_BUILD
+            ? Build.VERSION.SDK_INT
+            : Build.VERSION.SDK_INT + 1;
+
+    /**
+     * API version for L-release.
+     */
+    // TODO: Substitute this constant reference with Build.VERSION_CODES.L* once the *next* version
+    // becomes available.
+    public static final int VERSION_CODES_LXX = 21;
+}
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardTheme.java b/java/src/com/android/inputmethod/keyboard/KeyboardTheme.java
index 4c2e0dd..0cd606d 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardTheme.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardTheme.java
@@ -17,11 +17,11 @@
 package com.android.inputmethod.keyboard;
 
 import android.content.SharedPreferences;
-import android.os.Build;
 import android.os.Build.VERSION_CODES;
 import android.util.Log;
 
 import com.android.inputmethod.annotations.UsedForTesting;
+import com.android.inputmethod.compat.BuildCompatUtils;
 import com.android.inputmethod.latin.R;
 
 import java.util.Arrays;
@@ -47,8 +47,7 @@
                 VERSION_CODES.ICE_CREAM_SANDWICH),
         new KeyboardTheme(THEME_ID_LXX_LIGHT, R.style.KeyboardTheme_LXX_Light,
                 // Default theme for LXX.
-                // TODO: Update this constant once the *next* version becomes available.
-                VERSION_CODES.CUR_DEVELOPMENT),
+                BuildCompatUtils.VERSION_CODES_LXX),
         new KeyboardTheme(THEME_ID_LXX_DARK, R.style.KeyboardTheme_LXX_Dark,
                 VERSION_CODES.BASE),
     };
@@ -99,15 +98,6 @@
         return null;
     }
 
-    private static int getSdkVersion() {
-        final int sdkVersion = Build.VERSION.SDK_INT;
-        // TODO: Consider to remove this check once the *next* version becomes available.
-        if (sdkVersion > VERSION_CODES.KITKAT) {
-            return VERSION_CODES.CUR_DEVELOPMENT;
-        }
-        return sdkVersion;
-    }
-
     @UsedForTesting
     static KeyboardTheme getDefaultKeyboardTheme(final SharedPreferences prefs,
             final int sdkVersion) {
@@ -140,7 +130,7 @@
 
     public static void saveKeyboardThemeId(final String themeIdString,
             final SharedPreferences prefs) {
-        saveKeyboardThemeId(themeIdString, prefs, getSdkVersion());
+        saveKeyboardThemeId(themeIdString, prefs, BuildCompatUtils.EFFECTIVE_SDK_INT);
     }
 
     @UsedForTesting
@@ -159,7 +149,7 @@
     }
 
     public static KeyboardTheme getKeyboardTheme(final SharedPreferences prefs) {
-        return getKeyboardTheme(prefs, getSdkVersion());
+        return getKeyboardTheme(prefs, BuildCompatUtils.EFFECTIVE_SDK_INT);
     }
 
     @UsedForTesting
diff --git a/java/src/com/android/inputmethod/keyboard/emoji/EmojiCategory.java b/java/src/com/android/inputmethod/keyboard/emoji/EmojiCategory.java
index 512d461..0f9dc85 100644
--- a/java/src/com/android/inputmethod/keyboard/emoji/EmojiCategory.java
+++ b/java/src/com/android/inputmethod/keyboard/emoji/EmojiCategory.java
@@ -24,6 +24,7 @@
 import android.util.Log;
 import android.util.Pair;
 
+import com.android.inputmethod.compat.BuildCompatUtils;
 import com.android.inputmethod.keyboard.Key;
 import com.android.inputmethod.keyboard.Keyboard;
 import com.android.inputmethod.keyboard.KeyboardId;
@@ -121,9 +122,7 @@
                     sCategoryTabIconAttr[i], 0);
         }
         addShownCategoryId(EmojiCategory.ID_RECENTS);
-        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2
-                || android.os.Build.VERSION.CODENAME.equalsIgnoreCase("KeyLimePie")
-                || android.os.Build.VERSION.CODENAME.equalsIgnoreCase("KitKat")) {
+        if (BuildCompatUtils.EFFECTIVE_SDK_INT >= Build.VERSION_CODES.KITKAT) {
             addShownCategoryId(EmojiCategory.ID_PEOPLE);
             addShownCategoryId(EmojiCategory.ID_OBJECTS);
             addShownCategoryId(EmojiCategory.ID_NATURE);
diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java
index 90174e4..9f6862a 100644
--- a/java/src/com/android/inputmethod/latin/settings/Settings.java
+++ b/java/src/com/android/inputmethod/latin/settings/Settings.java
@@ -24,6 +24,7 @@
 import android.preference.PreferenceManager;
 import android.util.Log;
 
+import com.android.inputmethod.compat.BuildCompatUtils;
 import com.android.inputmethod.latin.AudioAndHapticFeedbackManager;
 import com.android.inputmethod.latin.InputAttributes;
 import com.android.inputmethod.latin.R;
@@ -68,9 +69,7 @@
     public static final String PREF_BLOCK_POTENTIALLY_OFFENSIVE =
             "pref_key_block_potentially_offensive";
     public static final boolean ENABLE_SHOW_LANGUAGE_SWITCH_KEY_SETTINGS =
-            (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT)
-            || (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT
-                    && Build.VERSION.CODENAME.equals("REL"));
+            BuildCompatUtils.EFFECTIVE_SDK_INT <= Build.VERSION_CODES.KITKAT;
     public static final String PREF_SHOW_LANGUAGE_SWITCH_KEY =
             "pref_show_language_switch_key";
     public static final String PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST =
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java b/tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java
index 0c7e400..c20954f 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java
@@ -16,6 +16,7 @@
 
 package com.android.inputmethod.keyboard;
 
+import static com.android.inputmethod.compat.BuildCompatUtils.VERSION_CODES_LXX;
 import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_ICS;
 import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_KLP;
 import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_DARK;
@@ -31,9 +32,6 @@
 public class KeyboardThemeTests extends AndroidTestCase {
     private SharedPreferences mPrefs;
 
-    // TODO: Remove this constant once the *next* version becomes available.
-    private static final int VERSION_CODES_LXX = VERSION_CODES.CUR_DEVELOPMENT;
-
     private static final int THEME_ID_NULL = -1;
     private static final int THEME_ID_UNKNOWN = -2;
     private static final int THEME_ID_ILLEGAL = -3;
