am a70542a5: am 5380acfd: Remove reference of VERSION_CODES.CUR_DEVELOPMENT

* commit 'a70542a5ef2c7f4d5cfe62150ed17be3776904c5':
  Remove reference of VERSION_CODES.CUR_DEVELOPMENT
main
Tadashi G. Takaoka 2014-08-12 15:02:59 +00:00 committed by Android Git Automerger
commit 89a2145448
2 changed files with 6 additions and 11 deletions

View File

@ -38,6 +38,9 @@ public final class KeyboardTheme implements Comparable<KeyboardTheme> {
public static final int THEME_ID_LXX_DARK = 4; public static final int THEME_ID_LXX_DARK = 4;
public static final int DEFAULT_THEME_ID = THEME_ID_KLP; public static final int DEFAULT_THEME_ID = THEME_ID_KLP;
// TODO: Update this constant once the *next* version becomes available.
public static final int VERSION_CODES_LXX = 21;
private static final KeyboardTheme[] KEYBOARD_THEMES = { private static final KeyboardTheme[] KEYBOARD_THEMES = {
new KeyboardTheme(THEME_ID_ICS, R.style.KeyboardTheme_ICS, new KeyboardTheme(THEME_ID_ICS, R.style.KeyboardTheme_ICS,
// This has never been selected because we support ICS or later. // This has never been selected because we support ICS or later.
@ -47,8 +50,7 @@ public final class KeyboardTheme implements Comparable<KeyboardTheme> {
VERSION_CODES.ICE_CREAM_SANDWICH), VERSION_CODES.ICE_CREAM_SANDWICH),
new KeyboardTheme(THEME_ID_LXX_LIGHT, R.style.KeyboardTheme_LXX_Light, new KeyboardTheme(THEME_ID_LXX_LIGHT, R.style.KeyboardTheme_LXX_Light,
// Default theme for LXX. // Default theme for LXX.
// TODO: Update this constant once the *next* version becomes available. VERSION_CODES_LXX),
VERSION_CODES.CUR_DEVELOPMENT),
new KeyboardTheme(THEME_ID_LXX_DARK, R.style.KeyboardTheme_LXX_Dark, new KeyboardTheme(THEME_ID_LXX_DARK, R.style.KeyboardTheme_LXX_Dark,
VERSION_CODES.BASE), VERSION_CODES.BASE),
}; };
@ -100,12 +102,7 @@ public final class KeyboardTheme implements Comparable<KeyboardTheme> {
} }
private static int getSdkVersion() { private static int getSdkVersion() {
final int sdkVersion = Build.VERSION.SDK_INT; return 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 @UsedForTesting

View File

@ -20,6 +20,7 @@ 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_KLP;
import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_DARK; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_DARK;
import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_LIGHT; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_LIGHT;
import static com.android.inputmethod.keyboard.KeyboardTheme.VERSION_CODES_LXX;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Build.VERSION_CODES; import android.os.Build.VERSION_CODES;
@ -31,9 +32,6 @@ import android.test.suitebuilder.annotation.SmallTest;
public class KeyboardThemeTests extends AndroidTestCase { public class KeyboardThemeTests extends AndroidTestCase {
private SharedPreferences mPrefs; 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_NULL = -1;
private static final int THEME_ID_UNKNOWN = -2; private static final int THEME_ID_UNKNOWN = -2;
private static final int THEME_ID_ILLEGAL = -3; private static final int THEME_ID_ILLEGAL = -3;