Update the API version checks in the support lib.
1. Since the API version has been finalized this change
updates the SDk version checks to use the JellyBean
verson number.
bug:5947249
Change-Id: I1011f76612f95ceef179acd0b8ab258c055a8369
diff --git a/v4/Android.mk b/v4/Android.mk
index 45c9fa5..3f01e5a 100644
--- a/v4/Android.mk
+++ b/v4/Android.mk
@@ -83,7 +83,7 @@
# A helper sub-library that makes direct use of JellyBean APIs.
include $(CLEAR_VARS)
LOCAL_MODULE := android-support-v4-jellybean
-LOCAL_SDK_VERSION := current
+LOCAL_SDK_VERSION := 16
LOCAL_SRC_FILES := $(call all-java-files-under, jellybean)
include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/v4/java/android/support/v4/view/AccessibilityDelegateCompat.java b/v4/java/android/support/v4/view/AccessibilityDelegateCompat.java
index a312550..6223647 100644
--- a/v4/java/android/support/v4/view/AccessibilityDelegateCompat.java
+++ b/v4/java/android/support/v4/view/AccessibilityDelegateCompat.java
@@ -269,9 +269,7 @@
private static final Object DEFAULT_DELEGATE;
static {
- // TODO: Update the conditional to use SDK_INT when we have an SDK version set.
- // (tracked by bug:5947249)
- if (Build.VERSION.CODENAME.equals("JellyBean")) { // JellyBean
+ if (Build.VERSION.SDK_INT >= 16) { // JellyBean
IMPL = new AccessibilityDelegateJellyBeanImpl();
} else if (Build.VERSION.SDK_INT >= 14) { // ICS
IMPL = new AccessibilityDelegateIcsImpl();
diff --git a/v4/java/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.java b/v4/java/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.java
index 57a3341..93ab721 100644
--- a/v4/java/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.java
+++ b/v4/java/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.java
@@ -701,9 +701,7 @@
}
static {
- // TODO: Update the conditional to use SDK_INT when we have an SDK version set.
- // (tracked by bug:5947249)
- if (Build.VERSION.CODENAME.equals("JellyBean")) { // JellyBean
+ if (Build.VERSION.SDK_INT >= 16) { // JellyBean
IMPL = new AccessibilityNodeInfoJellybeanImpl();
} else if (Build.VERSION.SDK_INT >= 14) { // ICS
IMPL = new AccessibilityNodeInfoIcsImpl();
diff --git a/v4/java/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat.java b/v4/java/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat.java
index 1cea061..2c80f4f 100644
--- a/v4/java/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat.java
+++ b/v4/java/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat.java
@@ -80,9 +80,7 @@
private final Object mProvider;
static {
- // TODO: Update the conditional to use SDK_INT when we have an SDK version set.
- // (tracked by bug:5947249)
- if (Build.VERSION.CODENAME.equals("JellyBean")) { // JellyBean
+ if (Build.VERSION.SDK_INT >= 16) { // JellyBean
IMPL = new AccessibilityNodeProviderJellyBeanImpl();
} else {
IMPL = new AccessibilityNodeProviderStubImpl();
diff --git a/v4/java/android/support/v4/view/accessibility/AccessibilityRecordCompat.java b/v4/java/android/support/v4/view/accessibility/AccessibilityRecordCompat.java
index 4fcc938..eddfbb3 100644
--- a/v4/java/android/support/v4/view/accessibility/AccessibilityRecordCompat.java
+++ b/v4/java/android/support/v4/view/accessibility/AccessibilityRecordCompat.java
@@ -502,9 +502,7 @@
}
static {
- // TODO: Update the conditional to use SDK_INT when we have an SDK version set.
- // (tracked by bug:5947249)
- if (Build.VERSION.CODENAME.equals("JellyBean")) { // JellyBean
+ if (Build.VERSION.SDK_INT >= 16) { // JellyBean
IMPL = new AccessibilityRecordJellyBeanImpl();
} else if (Build.VERSION.SDK_INT >= 15) { // ICS MR1
IMPL = new AccessibilityRecordIcsMr1Impl();