Remove @RequiresApi(16)
By mistake removed @RequiresApi(19) from SliceProviderCompat as well,
but given it is still needed to be removed I left it in this CL
Relnote: N/A
Test: refactoring
Change-Id: Iccd3cc4b49795ed37189d0e7ed457aef53f3485e
diff --git a/appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/BaseBasicsTestCase.java b/appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/BaseBasicsTestCase.java
index 96fdc01..8e12de3 100644
--- a/appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/BaseBasicsTestCase.java
+++ b/appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/BaseBasicsTestCase.java
@@ -149,7 +149,6 @@
@Test
@SdkSuppress(maxSdkVersion = 20)
- @RequiresApi(16)
public void testFitSystemWindowsReachesContent() throws Throwable {
final A activity = mActivityTestRule.getActivity();
if (!canShowSystemUi(activity)) {
@@ -387,7 +386,6 @@
verify(apCallback).onSupportActionModeFinished(any(ActionMode.class));
}
- @RequiresApi(16)
private WindowInsetsCompat waitForWindowInsets(@NonNull final View view) throws Throwable {
final CountDownLatch latch = new CountDownLatch(1);
final AtomicReference<WindowInsetsCompat> received = new AtomicReference<>();
diff --git a/appcompat/appcompat/src/androidTest/java/androidx/appcompat/testutils/TestUtils.java b/appcompat/appcompat/src/androidTest/java/androidx/appcompat/testutils/TestUtils.java
index 3c8b4a9..e13aa1a 100644
--- a/appcompat/appcompat/src/androidTest/java/androidx/appcompat/testutils/TestUtils.java
+++ b/appcompat/appcompat/src/androidTest/java/androidx/appcompat/testutils/TestUtils.java
@@ -308,7 +308,6 @@
* @param offsetX extra X offset for the tap
* @param offsetY extra Y offset for the tap
*/
- @RequiresApi(16)
public static void emulateTapOnView(Instrumentation instrumentation,
ActivityTestRule<?> activityTestRule, View anchorView,
int offsetX, int offsetY) {
@@ -372,7 +371,6 @@
* @param runner the runnable to run on the main thread, or {@code null} to
* simply force invalidation and a draw pass
*/
- @RequiresApi(16)
public static void runOnMainAndDrawSync(@NonNull final ActivityTestRule activityTestRule,
@NonNull final View view, @Nullable final Runnable runner) {
final CountDownLatch latch = new CountDownLatch(1);
diff --git a/appcompat/appcompat/src/main/java/androidx/appcompat/app/ResourcesFlusher.java b/appcompat/appcompat/src/main/java/androidx/appcompat/app/ResourcesFlusher.java
index 05c25bf..d7fb7ad 100644
--- a/appcompat/appcompat/src/main/java/androidx/appcompat/app/ResourcesFlusher.java
+++ b/appcompat/appcompat/src/main/java/androidx/appcompat/app/ResourcesFlusher.java
@@ -21,7 +21,6 @@
import android.util.Log;
import android.util.LongSparseArray;
-import androidx.annotation.DoNotInline;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
@@ -162,7 +161,6 @@
}
}
- @RequiresApi(16)
private static void flushThemedResourcesCache(@NonNull final Object cache) {
if (!sThemedResourceCacheClazzFetched) {
try {
@@ -203,23 +201,10 @@
}
if (unthemedEntries != null) {
- Api16Impl.clear(unthemedEntries);
+ unthemedEntries.clear();
}
}
private ResourcesFlusher() {
}
-
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() {
- // This class is not instantiable.
- }
-
- @DoNotInline
- static void clear(LongSparseArray longSparseArray) {
- longSparseArray.clear();
- }
-
- }
}
diff --git a/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatSpinner.java b/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatSpinner.java
index 3533744..7161958 100644
--- a/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatSpinner.java
+++ b/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatSpinner.java
@@ -640,11 +640,7 @@
}
final ViewTreeObserver vto = getViewTreeObserver();
if (vto != null) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- Api16Impl.removeOnGlobalLayoutListener(vto, this);
- } else {
- vto.removeGlobalOnLayoutListener(this);
- }
+ vto.removeOnGlobalLayoutListener(this);
}
}
};
@@ -1157,19 +1153,4 @@
view.setTextDirection(textDirection);
}
}
-
- @RequiresApi(16)
- private static final class Api16Impl {
- private Api16Impl() {
- // This class is not instantiable.
- }
-
- @DoNotInline
- static void removeOnGlobalLayoutListener(
- @NonNull ViewTreeObserver viewTreeObserver,
- @Nullable OnGlobalLayoutListener victim
- ) {
- viewTreeObserver.removeOnGlobalLayoutListener(victim);
- }
- }
}
diff --git a/core/core-ktx/api/current.txt b/core/core-ktx/api/current.txt
index 7a12effb..37085eb 100644
--- a/core/core-ktx/api/current.txt
+++ b/core/core-ktx/api/current.txt
@@ -426,21 +426,21 @@
}
public final class LongSparseArrayKt {
- method @RequiresApi(16) public static inline operator <T> boolean contains(android.util.LongSparseArray<T>, long key);
- method @RequiresApi(16) public static inline <T> boolean containsKey(android.util.LongSparseArray<T>, long key);
- method @RequiresApi(16) public static inline <T> boolean containsValue(android.util.LongSparseArray<T>, T value);
- method @RequiresApi(16) public static inline <T> void forEach(android.util.LongSparseArray<T>, kotlin.jvm.functions.Function2<? super java.lang.Long,? super T,kotlin.Unit> action);
- method @RequiresApi(16) public static inline <T> T getOrDefault(android.util.LongSparseArray<T>, long key, T defaultValue);
- method @RequiresApi(16) public static inline <T> T getOrElse(android.util.LongSparseArray<T>, long key, kotlin.jvm.functions.Function0<? extends T> defaultValue);
- method @RequiresApi(16) public static inline <T> int getSize(android.util.LongSparseArray<T>);
- method @RequiresApi(16) public static inline <T> boolean isEmpty(android.util.LongSparseArray<T>);
- method @RequiresApi(16) public static inline <T> boolean isNotEmpty(android.util.LongSparseArray<T>);
- method @RequiresApi(16) public static <T> kotlin.collections.LongIterator keyIterator(android.util.LongSparseArray<T>);
- method @RequiresApi(16) public static operator <T> android.util.LongSparseArray<T> plus(android.util.LongSparseArray<T>, android.util.LongSparseArray<T> other);
- method @RequiresApi(16) public static <T> void putAll(android.util.LongSparseArray<T>, android.util.LongSparseArray<T> other);
- method @RequiresApi(16) public static <T> boolean remove(android.util.LongSparseArray<T>, long key, T value);
- method @RequiresApi(16) public static inline operator <T> void set(android.util.LongSparseArray<T>, long key, T value);
- method @RequiresApi(16) public static <T> java.util.Iterator<T> valueIterator(android.util.LongSparseArray<T>);
+ method public static inline operator <T> boolean contains(android.util.LongSparseArray<T>, long key);
+ method public static inline <T> boolean containsKey(android.util.LongSparseArray<T>, long key);
+ method public static inline <T> boolean containsValue(android.util.LongSparseArray<T>, T value);
+ method public static inline <T> void forEach(android.util.LongSparseArray<T>, kotlin.jvm.functions.Function2<? super java.lang.Long,? super T,kotlin.Unit> action);
+ method public static inline <T> T getOrDefault(android.util.LongSparseArray<T>, long key, T defaultValue);
+ method public static inline <T> T getOrElse(android.util.LongSparseArray<T>, long key, kotlin.jvm.functions.Function0<? extends T> defaultValue);
+ method public static inline <T> int getSize(android.util.LongSparseArray<T>);
+ method public static inline <T> boolean isEmpty(android.util.LongSparseArray<T>);
+ method public static inline <T> boolean isNotEmpty(android.util.LongSparseArray<T>);
+ method public static <T> kotlin.collections.LongIterator keyIterator(android.util.LongSparseArray<T>);
+ method public static operator <T> android.util.LongSparseArray<T> plus(android.util.LongSparseArray<T>, android.util.LongSparseArray<T> other);
+ method public static <T> void putAll(android.util.LongSparseArray<T>, android.util.LongSparseArray<T> other);
+ method public static <T> boolean remove(android.util.LongSparseArray<T>, long key, T value);
+ method public static inline operator <T> void set(android.util.LongSparseArray<T>, long key, T value);
+ method public static <T> java.util.Iterator<T> valueIterator(android.util.LongSparseArray<T>);
}
public final class LruCacheKt {
@@ -608,7 +608,7 @@
method public static inline boolean isInvisible(android.view.View);
method public static inline boolean isVisible(android.view.View);
method public static inline Runnable postDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
- method @RequiresApi(16) public static Runnable postOnAnimationDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
+ method public static Runnable postOnAnimationDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
method public static inline void setGone(android.view.View, boolean);
method public static inline void setInvisible(android.view.View, boolean);
method public static inline void setPadding(android.view.View, @Px int size);
diff --git a/core/core-ktx/api/restricted_current.txt b/core/core-ktx/api/restricted_current.txt
index 7a12effb..37085eb 100644
--- a/core/core-ktx/api/restricted_current.txt
+++ b/core/core-ktx/api/restricted_current.txt
@@ -426,21 +426,21 @@
}
public final class LongSparseArrayKt {
- method @RequiresApi(16) public static inline operator <T> boolean contains(android.util.LongSparseArray<T>, long key);
- method @RequiresApi(16) public static inline <T> boolean containsKey(android.util.LongSparseArray<T>, long key);
- method @RequiresApi(16) public static inline <T> boolean containsValue(android.util.LongSparseArray<T>, T value);
- method @RequiresApi(16) public static inline <T> void forEach(android.util.LongSparseArray<T>, kotlin.jvm.functions.Function2<? super java.lang.Long,? super T,kotlin.Unit> action);
- method @RequiresApi(16) public static inline <T> T getOrDefault(android.util.LongSparseArray<T>, long key, T defaultValue);
- method @RequiresApi(16) public static inline <T> T getOrElse(android.util.LongSparseArray<T>, long key, kotlin.jvm.functions.Function0<? extends T> defaultValue);
- method @RequiresApi(16) public static inline <T> int getSize(android.util.LongSparseArray<T>);
- method @RequiresApi(16) public static inline <T> boolean isEmpty(android.util.LongSparseArray<T>);
- method @RequiresApi(16) public static inline <T> boolean isNotEmpty(android.util.LongSparseArray<T>);
- method @RequiresApi(16) public static <T> kotlin.collections.LongIterator keyIterator(android.util.LongSparseArray<T>);
- method @RequiresApi(16) public static operator <T> android.util.LongSparseArray<T> plus(android.util.LongSparseArray<T>, android.util.LongSparseArray<T> other);
- method @RequiresApi(16) public static <T> void putAll(android.util.LongSparseArray<T>, android.util.LongSparseArray<T> other);
- method @RequiresApi(16) public static <T> boolean remove(android.util.LongSparseArray<T>, long key, T value);
- method @RequiresApi(16) public static inline operator <T> void set(android.util.LongSparseArray<T>, long key, T value);
- method @RequiresApi(16) public static <T> java.util.Iterator<T> valueIterator(android.util.LongSparseArray<T>);
+ method public static inline operator <T> boolean contains(android.util.LongSparseArray<T>, long key);
+ method public static inline <T> boolean containsKey(android.util.LongSparseArray<T>, long key);
+ method public static inline <T> boolean containsValue(android.util.LongSparseArray<T>, T value);
+ method public static inline <T> void forEach(android.util.LongSparseArray<T>, kotlin.jvm.functions.Function2<? super java.lang.Long,? super T,kotlin.Unit> action);
+ method public static inline <T> T getOrDefault(android.util.LongSparseArray<T>, long key, T defaultValue);
+ method public static inline <T> T getOrElse(android.util.LongSparseArray<T>, long key, kotlin.jvm.functions.Function0<? extends T> defaultValue);
+ method public static inline <T> int getSize(android.util.LongSparseArray<T>);
+ method public static inline <T> boolean isEmpty(android.util.LongSparseArray<T>);
+ method public static inline <T> boolean isNotEmpty(android.util.LongSparseArray<T>);
+ method public static <T> kotlin.collections.LongIterator keyIterator(android.util.LongSparseArray<T>);
+ method public static operator <T> android.util.LongSparseArray<T> plus(android.util.LongSparseArray<T>, android.util.LongSparseArray<T> other);
+ method public static <T> void putAll(android.util.LongSparseArray<T>, android.util.LongSparseArray<T> other);
+ method public static <T> boolean remove(android.util.LongSparseArray<T>, long key, T value);
+ method public static inline operator <T> void set(android.util.LongSparseArray<T>, long key, T value);
+ method public static <T> java.util.Iterator<T> valueIterator(android.util.LongSparseArray<T>);
}
public final class LruCacheKt {
@@ -608,7 +608,7 @@
method public static inline boolean isInvisible(android.view.View);
method public static inline boolean isVisible(android.view.View);
method public static inline Runnable postDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
- method @RequiresApi(16) public static Runnable postOnAnimationDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
+ method public static Runnable postOnAnimationDelayed(android.view.View, long delayInMillis, kotlin.jvm.functions.Function0<kotlin.Unit> action);
method public static inline void setGone(android.view.View, boolean);
method public static inline void setInvisible(android.view.View, boolean);
method public static inline void setPadding(android.view.View, @Px int size);
diff --git a/core/core-ktx/src/main/java/androidx/core/util/LongSparseArray.kt b/core/core-ktx/src/main/java/androidx/core/util/LongSparseArray.kt
index 50c38ec3..7af927a 100644
--- a/core/core-ktx/src/main/java/androidx/core/util/LongSparseArray.kt
+++ b/core/core-ktx/src/main/java/androidx/core/util/LongSparseArray.kt
@@ -18,29 +18,19 @@
package androidx.core.util
-import android.annotation.SuppressLint
import android.util.LongSparseArray
-import androidx.annotation.RequiresApi
/** Returns the number of key/value pairs in the collection. */
-@get:RequiresApi(16)
-@get:SuppressLint("ClassVerificationFailure")
public inline val <T> LongSparseArray<T>.size: Int get() = size()
/** Returns true if the collection contains [key]. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline operator fun <T> LongSparseArray<T>.contains(key: Long): Boolean =
indexOfKey(key) >= 0
/** Allows the use of the index operator for storing values in the collection. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline operator fun <T> LongSparseArray<T>.set(key: Long, value: T): Unit = put(key, value)
/** Creates a new collection by adding or replacing entries from [other]. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public operator fun <T> LongSparseArray<T>.plus(other: LongSparseArray<T>): LongSparseArray<T> {
val new = LongSparseArray<T>(size() + other.size())
new.putAll(this)
@@ -49,41 +39,27 @@
}
/** Returns true if the collection contains [key]. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline fun <T> LongSparseArray<T>.containsKey(key: Long): Boolean = indexOfKey(key) >= 0
/** Returns true if the collection contains [value]. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline fun <T> LongSparseArray<T>.containsValue(value: T): Boolean =
indexOfValue(value) >= 0
/** Return the value corresponding to [key], or [defaultValue] when not present. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline fun <T> LongSparseArray<T>.getOrDefault(key: Long, defaultValue: T): T =
get(key) ?: defaultValue
/** Return the value corresponding to [key], or from [defaultValue] when not present. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline fun <T> LongSparseArray<T>.getOrElse(key: Long, defaultValue: () -> T): T =
get(key) ?: defaultValue()
/** Return true when the collection contains no elements. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline fun <T> LongSparseArray<T>.isEmpty(): Boolean = size() == 0
/** Return true when the collection contains elements. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline fun <T> LongSparseArray<T>.isNotEmpty(): Boolean = size() != 0
/** Removes the entry for [key] only if it is mapped to [value]. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public fun <T> LongSparseArray<T>.remove(key: Long, value: T): Boolean {
val index = indexOfKey(key)
if (index >= 0 && value == valueAt(index)) {
@@ -94,12 +70,9 @@
}
/** Update this collection by adding or replacing entries from [other]. */
-@RequiresApi(16)
public fun <T> LongSparseArray<T>.putAll(other: LongSparseArray<T>): Unit = other.forEach(::put)
/** Performs the given [action] for each key/value entry. */
-@RequiresApi(16)
-@SuppressLint("ClassVerificationFailure")
public inline fun <T> LongSparseArray<T>.forEach(action: (key: Long, value: T) -> Unit) {
for (index in 0 until size()) {
action(keyAt(index), valueAt(index))
@@ -107,25 +80,19 @@
}
/** Return an iterator over the collection's keys. */
-@RequiresApi(16)
public fun <T> LongSparseArray<T>.keyIterator(): LongIterator = object : LongIterator() {
var index = 0
- @SuppressLint("ClassVerificationFailure")
override fun hasNext() = index < size()
- @SuppressLint("ClassVerificationFailure")
override fun nextLong() = keyAt(index++)
}
/** Return an iterator over the collection's values. */
-@RequiresApi(16)
public fun <T> LongSparseArray<T>.valueIterator(): Iterator<T> = object : Iterator<T> {
var index = 0
- @SuppressLint("ClassVerificationFailure")
override fun hasNext() = index < size()
- @SuppressLint("ClassVerificationFailure")
override fun next() = valueAt(index++)
}
diff --git a/core/core-ktx/src/main/java/androidx/core/view/View.kt b/core/core-ktx/src/main/java/androidx/core/view/View.kt
index 0b0febc..e30fc02 100644
--- a/core/core-ktx/src/main/java/androidx/core/view/View.kt
+++ b/core/core-ktx/src/main/java/androidx/core/view/View.kt
@@ -24,7 +24,6 @@
import android.view.ViewGroup
import android.view.ViewGroup.MarginLayoutParams
import android.view.ViewParent
-import androidx.annotation.DoNotInline
import androidx.annotation.Px
import androidx.annotation.RequiresApi
import androidx.core.graphics.applyCanvas
@@ -207,13 +206,12 @@
*
* @return the created Runnable
*/
-@RequiresApi(16)
public fun View.postOnAnimationDelayed(
delayInMillis: Long,
action: () -> Unit
): Runnable {
val runnable = Runnable { action() }
- Api16Impl.postOnAnimationDelayed(this, runnable, delayInMillis)
+ postOnAnimationDelayed(runnable, delayInMillis)
return runnable
}
@@ -416,16 +414,3 @@
yieldAll(this@allViews.descendants)
}
}
-
-@RequiresApi(16)
-private object Api16Impl {
- @JvmStatic
- @DoNotInline
- fun postOnAnimationDelayed(
- view: View,
- action: Runnable,
- delayInMillis: Long
- ) {
- view.postOnAnimationDelayed(action, delayInMillis)
- }
-}
diff --git a/core/core-remoteviews/api/current.txt b/core/core-remoteviews/api/current.txt
index f760371..fb0c868 100644
--- a/core/core-remoteviews/api/current.txt
+++ b/core/core-remoteviews/api/current.txt
@@ -138,7 +138,7 @@
method @RequiresApi(31) public static void setTextViewAllCaps(android.widget.RemoteViews, @IdRes int viewId, boolean allCaps);
method public static void setTextViewAutoLinkMask(android.widget.RemoteViews, @IdRes int viewId, int mask);
method @RequiresApi(31) public static void setTextViewCompoundDrawablePadding(android.widget.RemoteViews, @IdRes int viewId, float value, int unit);
- method @RequiresApi(16) public static void setTextViewCompoundDrawablePadding(android.widget.RemoteViews, @IdRes int viewId, @Px int pad);
+ method public static void setTextViewCompoundDrawablePadding(android.widget.RemoteViews, @IdRes int viewId, @Px int pad);
method @RequiresApi(31) public static void setTextViewCompoundDrawablePaddingDimen(android.widget.RemoteViews, @IdRes int viewId, @DimenRes int resId);
method @RequiresApi(31) public static void setTextViewCompoundDrawablePaddingDimenAttr(android.widget.RemoteViews, @IdRes int viewId, @AttrRes int resId);
method public static void setTextViewEms(android.widget.RemoteViews, @IdRes int viewId, int ems);
@@ -258,8 +258,8 @@
method @RequiresApi(31) public static void setViewStateDescription(android.widget.RemoteViews, @IdRes int viewId, @StringRes int resId);
method @RequiresApi(30) public static void setViewStateDescription(android.widget.RemoteViews, @IdRes int viewId, CharSequence? stateDescription);
method @RequiresApi(31) public static void setViewStateDescriptionAttr(android.widget.RemoteViews, @IdRes int viewId, @AttrRes int resId);
- method @RequiresApi(16) public static void setViewStubInflatedId(android.widget.RemoteViews, @IdRes int viewId, int inflatedId);
- method @RequiresApi(16) public static void setViewStubLayoutResource(android.widget.RemoteViews, @IdRes int viewId, @LayoutRes int layoutResource);
+ method public static void setViewStubInflatedId(android.widget.RemoteViews, @IdRes int viewId, int inflatedId);
+ method public static void setViewStubLayoutResource(android.widget.RemoteViews, @IdRes int viewId, @LayoutRes int layoutResource);
method @RequiresApi(31) public static void setViewTranslationXDimen(android.widget.RemoteViews, @IdRes int viewId, float value, int unit);
method @RequiresApi(31) public static void setViewTranslationXDimen(android.widget.RemoteViews, @IdRes int viewId, @DimenRes int resId);
method @RequiresApi(31) public static void setViewTranslationXDimenAttr(android.widget.RemoteViews, @IdRes int viewId, @AttrRes int resId);
diff --git a/core/core-remoteviews/api/restricted_current.txt b/core/core-remoteviews/api/restricted_current.txt
index 236d4b6..4465166 100644
--- a/core/core-remoteviews/api/restricted_current.txt
+++ b/core/core-remoteviews/api/restricted_current.txt
@@ -138,7 +138,7 @@
method @RequiresApi(31) public static void setTextViewAllCaps(android.widget.RemoteViews, @IdRes int viewId, boolean allCaps);
method public static void setTextViewAutoLinkMask(android.widget.RemoteViews, @IdRes int viewId, int mask);
method @RequiresApi(31) public static void setTextViewCompoundDrawablePadding(android.widget.RemoteViews, @IdRes int viewId, float value, int unit);
- method @RequiresApi(16) public static void setTextViewCompoundDrawablePadding(android.widget.RemoteViews, @IdRes int viewId, @Px int pad);
+ method public static void setTextViewCompoundDrawablePadding(android.widget.RemoteViews, @IdRes int viewId, @Px int pad);
method @RequiresApi(31) public static void setTextViewCompoundDrawablePaddingDimen(android.widget.RemoteViews, @IdRes int viewId, @DimenRes int resId);
method @RequiresApi(31) public static void setTextViewCompoundDrawablePaddingDimenAttr(android.widget.RemoteViews, @IdRes int viewId, @AttrRes int resId);
method public static void setTextViewEms(android.widget.RemoteViews, @IdRes int viewId, int ems);
@@ -258,8 +258,8 @@
method @RequiresApi(31) public static void setViewStateDescription(android.widget.RemoteViews, @IdRes int viewId, @StringRes int resId);
method @RequiresApi(30) public static void setViewStateDescription(android.widget.RemoteViews, @IdRes int viewId, CharSequence? stateDescription);
method @RequiresApi(31) public static void setViewStateDescriptionAttr(android.widget.RemoteViews, @IdRes int viewId, @AttrRes int resId);
- method @RequiresApi(16) public static void setViewStubInflatedId(android.widget.RemoteViews, @IdRes int viewId, int inflatedId);
- method @RequiresApi(16) public static void setViewStubLayoutResource(android.widget.RemoteViews, @IdRes int viewId, @LayoutRes int layoutResource);
+ method public static void setViewStubInflatedId(android.widget.RemoteViews, @IdRes int viewId, int inflatedId);
+ method public static void setViewStubLayoutResource(android.widget.RemoteViews, @IdRes int viewId, @LayoutRes int layoutResource);
method @RequiresApi(31) public static void setViewTranslationXDimen(android.widget.RemoteViews, @IdRes int viewId, float value, int unit);
method @RequiresApi(31) public static void setViewTranslationXDimen(android.widget.RemoteViews, @IdRes int viewId, @DimenRes int resId);
method @RequiresApi(31) public static void setViewTranslationXDimenAttr(android.widget.RemoteViews, @IdRes int viewId, @AttrRes int resId);
diff --git a/core/core-remoteviews/src/main/java/androidx/core/widget/RemoteViewsCompat.kt b/core/core-remoteviews/src/main/java/androidx/core/widget/RemoteViewsCompat.kt
index 7924af8..b3ac746 100644
--- a/core/core-remoteviews/src/main/java/androidx/core/widget/RemoteViewsCompat.kt
+++ b/core/core-remoteviews/src/main/java/androidx/core/widget/RemoteViewsCompat.kt
@@ -2031,7 +2031,6 @@
* @param viewId The id of the target view
* @param pad The padding between the compound drawables and the text, in pixels.
*/
- @RequiresApi(16)
@JvmStatic
public fun RemoteViews.setTextViewCompoundDrawablePadding(@IdRes viewId: Int, @Px pad: Int) {
requireSdk(16, "setCompoundDrawablePadding")
@@ -3609,7 +3608,6 @@
* @param inflatedId A positive integer used to identify the inflated view or
* [android.view.View.NO_ID] if the inflated view should keep its id.
*/
- @RequiresApi(16)
@JvmStatic
public fun RemoteViews.setViewStubInflatedId(@IdRes viewId: Int, inflatedId: Int) {
requireSdk(16, "setInflatedId")
@@ -3624,7 +3622,6 @@
* @param viewId The id of the target view
* @param layoutResource A valid layout resource identifier (different from 0).
*/
- @RequiresApi(16)
@JvmStatic
public fun RemoteViews.setViewStubLayoutResource(
@IdRes viewId: Int,
diff --git a/core/core/api/current.txt b/core/core/api/current.txt
index 1f15519..3572788 100644
--- a/core/core/api/current.txt
+++ b/core/core/api/current.txt
@@ -1941,7 +1941,7 @@
public final class HandlerCompat {
method public static android.os.Handler createAsync(android.os.Looper);
method public static android.os.Handler createAsync(android.os.Looper, android.os.Handler.Callback);
- method @RequiresApi(16) public static boolean hasCallbacks(android.os.Handler, Runnable);
+ method public static boolean hasCallbacks(android.os.Handler, Runnable);
method public static boolean postDelayed(android.os.Handler, Runnable, Object?, long);
}
diff --git a/core/core/api/restricted_current.txt b/core/core/api/restricted_current.txt
index c221686..58ac1dd 100644
--- a/core/core/api/restricted_current.txt
+++ b/core/core/api/restricted_current.txt
@@ -2295,7 +2295,7 @@
public final class HandlerCompat {
method public static android.os.Handler createAsync(android.os.Looper);
method public static android.os.Handler createAsync(android.os.Looper, android.os.Handler.Callback);
- method @RequiresApi(16) public static boolean hasCallbacks(android.os.Handler, Runnable);
+ method public static boolean hasCallbacks(android.os.Handler, Runnable);
method public static boolean postDelayed(android.os.Handler, Runnable, Object?, long);
}
diff --git a/core/core/src/androidTest/java/androidx/core/view/AccessibilityDelegateCompatTest.java b/core/core/src/androidTest/java/androidx/core/view/AccessibilityDelegateCompatTest.java
index 072cfda..67209d2 100644
--- a/core/core/src/androidTest/java/androidx/core/view/AccessibilityDelegateCompatTest.java
+++ b/core/core/src/androidTest/java/androidx/core/view/AccessibilityDelegateCompatTest.java
@@ -709,16 +709,14 @@
mView.requestSendAccessibilityEvent(childView, event);
verify(mockDelegate).onRequestSendAccessibilityEvent(mView, childView, event);
- if (Build.VERSION.SDK_INT >= 16) {
- mView.getAccessibilityNodeProvider();
- verify(mockDelegate).getAccessibilityNodeProvider(mView);
+ mView.getAccessibilityNodeProvider();
+ verify(mockDelegate).getAccessibilityNodeProvider(mView);
- final Bundle bundle = new Bundle();
- mView.performAccessibilityAction(
- AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS, bundle);
- verify(mockDelegate).performAccessibilityAction(
- mView, AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS, bundle);
- }
+ final Bundle bundle = new Bundle();
+ mView.performAccessibilityAction(
+ AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS, bundle);
+ verify(mockDelegate).performAccessibilityAction(
+ mView, AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS, bundle);
}
private void assertMockBridgedAccessibilityDelegateCompatWorkingOnView(
diff --git a/core/core/src/main/java/androidx/core/app/ActivityOptionsCompat.java b/core/core/src/main/java/androidx/core/app/ActivityOptionsCompat.java
index 1895964..6287095 100644
--- a/core/core/src/main/java/androidx/core/app/ActivityOptionsCompat.java
+++ b/core/core/src/main/java/androidx/core/app/ActivityOptionsCompat.java
@@ -243,7 +243,6 @@
return new ActivityOptionsCompat();
}
- @RequiresApi(16)
private static class ActivityOptionsCompatImpl extends ActivityOptionsCompat {
private final ActivityOptions mActivityOptions;
diff --git a/core/core/src/main/java/androidx/core/app/NotificationCompat.java b/core/core/src/main/java/androidx/core/app/NotificationCompat.java
index d684a7b..819cbd5 100644
--- a/core/core/src/main/java/androidx/core/app/NotificationCompat.java
+++ b/core/core/src/main/java/androidx/core/app/NotificationCompat.java
@@ -3045,20 +3045,20 @@
// RemoteViews.setViewPadding and RemoteViews.setTextViewTextSize is not available on
// ICS-
- if (showLine2 && Build.VERSION.SDK_INT >= 16) {
+ if (showLine2) {
if (fitIn1U) {
// need to shrink all the type to make sure everything fits
final float subTextSize = res.getDimensionPixelSize(
R.dimen.notification_subtext_size);
- Api16Impl.setTextViewTextSize(contentView, R.id.text,
- TypedValue.COMPLEX_UNIT_PX, subTextSize);
+ contentView.setTextViewTextSize(R.id.text, TypedValue.COMPLEX_UNIT_PX,
+ subTextSize);
}
// vertical centering
- Api16Impl.setViewPadding(contentView, R.id.line1, 0, 0, 0, 0);
+ contentView.setViewPadding(R.id.line1, 0, 0, 0, 0);
}
if (mBuilder.getWhenIfShowing() != 0) {
- if (mBuilder.mUseChronometer && Build.VERSION.SDK_INT >= 16) {
+ if (mBuilder.mUseChronometer) {
contentView.setViewVisibility(R.id.chronometer, View.VISIBLE);
contentView.setLong(R.id.chronometer, "setBase",
mBuilder.getWhenIfShowing()
@@ -3144,8 +3144,8 @@
outerView.setViewVisibility(R.id.notification_main_column, View.VISIBLE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// Adjust padding depending on font size.
- Api16Impl.setViewPadding(outerView, R.id.notification_main_column_container, 0,
- calculateTopPadding(), 0, 0);
+ int top = calculateTopPadding();
+ outerView.setViewPadding(R.id.notification_main_column_container, 0, top, 0, 0);
}
}
@@ -3174,28 +3174,6 @@
/**
* A class for wrapping calls to {@link NotificationCompat.Style} methods which
- * were added in API 16; these calls must be wrapped to avoid performance issues.
- * See the UnsafeNewApiCall lint rule for more details.
- */
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() { }
-
- @DoNotInline
- static void setTextViewTextSize(RemoteViews remoteViews, int viewId, int units,
- float size) {
- remoteViews.setTextViewTextSize(viewId, units, size);
- }
-
- @DoNotInline
- static void setViewPadding(RemoteViews remoteViews, int viewId, int left, int top,
- int right, int bottom) {
- remoteViews.setViewPadding(viewId, left, top, right, bottom);
- }
- }
-
- /**
- * A class for wrapping calls to {@link NotificationCompat.Style} methods which
* were added in API 24; these calls must be wrapped to avoid performance issues.
* See the UnsafeNewApiCall lint rule for more details.
*/
@@ -3342,52 +3320,51 @@
@RestrictTo(LIBRARY_GROUP_PREFIX)
@Override
public void apply(NotificationBuilderWithBuilderAccessor builder) {
- if (Build.VERSION.SDK_INT >= 16) {
- Notification.BigPictureStyle style =
- Api16Impl.setBigContentTitle(
- Api16Impl.createBigPictureStyle(builder.getBuilder()),
- mBigContentTitle
- );
- if (mPictureIcon != null) {
- // Attempts to set the icon for BigPictureStyle; prefers using data as Icon,
- // with a fallback to store the Bitmap if Icon is not supported directly.
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- Context context = null;
- if (builder instanceof NotificationCompatBuilder) {
- context = ((NotificationCompatBuilder) builder).getContext();
- }
- Api31Impl.setBigPicture(style, mPictureIcon.toIcon(context));
- } else if (mPictureIcon.getType() == IconCompat.TYPE_BITMAP) {
- style = Api16Impl.bigPicture(style, mPictureIcon.getBitmap());
- }
- }
- // Attempts to set the big large icon for BigPictureStyle.
- if (mBigLargeIconSet) {
- if (mBigLargeIcon == null) {
- Api16Impl.setBigLargeIcon(style, null);
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
- Context context = null;
- if (builder instanceof NotificationCompatBuilder) {
- context = ((NotificationCompatBuilder) builder).getContext();
- }
- Api23Impl.setBigLargeIcon(style, mBigLargeIcon.toIcon(context));
- } else if (mBigLargeIcon.getType() == IconCompat.TYPE_BITMAP) {
- // Before M, only the Bitmap setter existed
- Api16Impl.setBigLargeIcon(style, mBigLargeIcon.getBitmap());
- } else {
- // TODO(b/172282791): When we add #bigLargeIcon(Icon) we'll need to support
- // other icon types here by rendering them into a new Bitmap.
- Api16Impl.setBigLargeIcon(style, null);
- }
- }
- if (mSummaryTextSet) {
- Api16Impl.setSummaryText(style, mSummaryText);
- }
+ Notification.Builder builder1 = builder.getBuilder();
+ Notification.BigPictureStyle bigPictureStyle =
+ new Notification.BigPictureStyle(builder1);
+ Notification.BigPictureStyle style =
+ bigPictureStyle.setBigContentTitle(mBigContentTitle);
+ if (mPictureIcon != null) {
+ // Attempts to set the icon for BigPictureStyle; prefers using data as Icon,
+ // with a fallback to store the Bitmap if Icon is not supported directly.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- Api31Impl.showBigPictureWhenCollapsed(style, mShowBigPictureWhenCollapsed);
- Api31Impl.setContentDescription(style, mPictureContentDescription);
+ Context context = null;
+ if (builder instanceof NotificationCompatBuilder) {
+ context = ((NotificationCompatBuilder) builder).getContext();
+ }
+ Api31Impl.setBigPicture(style, mPictureIcon.toIcon(context));
+ } else if (mPictureIcon.getType() == IconCompat.TYPE_BITMAP) {
+ Bitmap b = mPictureIcon.getBitmap();
+ style = style.bigPicture(b);
}
}
+ // Attempts to set the big large icon for BigPictureStyle.
+ if (mBigLargeIconSet) {
+ if (mBigLargeIcon == null) {
+ style.bigLargeIcon((Bitmap) null);
+ } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ Context context = null;
+ if (builder instanceof NotificationCompatBuilder) {
+ context = ((NotificationCompatBuilder) builder).getContext();
+ }
+ Api23Impl.setBigLargeIcon(style, mBigLargeIcon.toIcon(context));
+ } else if (mBigLargeIcon.getType() == IconCompat.TYPE_BITMAP) {
+ // Before M, only the Bitmap setter existed
+ style.bigLargeIcon(mBigLargeIcon.getBitmap());
+ } else {
+ // TODO(b/172282791): When we add #bigLargeIcon(Icon) we'll need to support
+ // other icon types here by rendering them into a new Bitmap.
+ style.bigLargeIcon((Bitmap) null);
+ }
+ }
+ if (mSummaryTextSet) {
+ style.setSummaryText(mSummaryText);
+ }
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ Api31Impl.showBigPictureWhenCollapsed(style, mShowBigPictureWhenCollapsed);
+ Api31Impl.setContentDescription(style, mPictureContentDescription);
+ }
}
/**
@@ -3452,51 +3429,6 @@
/**
* A class for wrapping calls to {@link Notification.BigPictureStyle} methods which
- * were added in API 16; these calls must be wrapped to avoid performance issues.
- * See the UnsafeNewApiCall lint rule for more details.
- */
- @RequiresApi(16)
- private static class Api16Impl {
- private Api16Impl() {
- }
-
- @DoNotInline
- static Notification.BigPictureStyle bigPicture(
- Notification.BigPictureStyle bigPictureStyle, Bitmap b) {
- return bigPictureStyle.bigPicture(b);
- }
-
- @DoNotInline
- static Notification.BigPictureStyle createBigPictureStyle(
- Notification.Builder builder) {
- return new Notification.BigPictureStyle(builder);
- }
-
- /**
- * Calls {@link Notification.BigPictureStyle#bigLargeIcon(Bitmap)}
- */
- @RequiresApi(16)
- static void setBigLargeIcon(Notification.BigPictureStyle style, Bitmap icon) {
- style.bigLargeIcon(icon);
- }
-
- /**
- * Calls {@link Notification.BigPictureStyle#setSummaryText(CharSequence)}
- */
- @RequiresApi(16)
- static void setSummaryText(Notification.BigPictureStyle style, CharSequence text) {
- style.setSummaryText(text);
- }
-
- @DoNotInline
- static Notification.BigPictureStyle setBigContentTitle(
- Notification.BigPictureStyle bigPictureStyle, CharSequence title) {
- return bigPictureStyle.setBigContentTitle(title);
- }
- }
-
- /**
- * A class for wrapping calls to {@link Notification.BigPictureStyle} methods which
* were added in API 23; these calls must be wrapped to avoid performance issues.
* See the UnsafeNewApiCall lint rule for more details.
*/
@@ -3628,14 +3560,13 @@
@RestrictTo(LIBRARY_GROUP_PREFIX)
@Override
public void apply(NotificationBuilderWithBuilderAccessor builder) {
- if (Build.VERSION.SDK_INT >= 16) {
- Notification.BigTextStyle style =
- Api16Impl.createBigTextStyle(builder.getBuilder());
- style = Api16Impl.setBigContentTitle(style, mBigContentTitle);
- style = Api16Impl.bigText(style, mBigText);
- if (mSummaryTextSet) {
- Api16Impl.setSummaryText(style, mSummaryText);
- }
+ Notification.Builder builder1 = builder.getBuilder();
+ Notification.BigTextStyle style =
+ new Notification.BigTextStyle(builder1);
+ style = style.setBigContentTitle(mBigContentTitle);
+ style = style.bigText(mBigText);
+ if (mSummaryTextSet) {
+ style.setSummaryText(mSummaryText);
}
}
@@ -3672,40 +3603,6 @@
super.clearCompatExtraKeys(extras);
extras.remove(EXTRA_BIG_TEXT);
}
-
- /**
- * A class for wrapping calls to {@link Notification.BigTextStyle} methods which
- * were added in API 16; these calls must be wrapped to avoid performance issues.
- * See the UnsafeNewApiCall lint rule for more details.
- */
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() {
- }
-
- @DoNotInline
- static Notification.BigTextStyle createBigTextStyle(Notification.Builder builder) {
- return new Notification.BigTextStyle(builder);
- }
-
- @DoNotInline
- static Notification.BigTextStyle setBigContentTitle(
- Notification.BigTextStyle bigTextStyle, CharSequence title) {
- return bigTextStyle.setBigContentTitle(title);
- }
-
- @DoNotInline
- static Notification.BigTextStyle bigText(
- Notification.BigTextStyle bigTextStyle, CharSequence bigText) {
- return bigTextStyle.bigText(bigText);
- }
-
- @DoNotInline
- static Notification.BigTextStyle setSummaryText(Notification.BigTextStyle bigTextStyle,
- CharSequence cs) {
- return bigTextStyle.setSummaryText(cs);
- }
- }
}
/**
@@ -4055,7 +3952,8 @@
Api28Impl.setGroupConversation((Notification.MessagingStyle) frameworkStyle,
mIsGroupConversation);
}
- Api16Impl.setBuilder((Notification.Style) frameworkStyle, builder.getBuilder());
+ Notification.Builder builder1 = builder.getBuilder();
+ ((Notification.Style) frameworkStyle).setBuilder(builder1);
} else {
Message latestIncomingMessage = findLatestIncomingMessage();
// Set the title
@@ -4075,24 +3973,23 @@
: latestIncomingMessage.getText());
}
// Build a fallback BigTextStyle for API 16-23 devices
- if (Build.VERSION.SDK_INT >= 16) {
- SpannableStringBuilder completeMessage = new SpannableStringBuilder();
- boolean showNames = mConversationTitle != null
- || hasMessagesWithoutSender();
- for (int i = mMessages.size() - 1; i >= 0; i--) {
- Message message = mMessages.get(i);
- CharSequence line;
- line = showNames ? makeMessageLine(message) : message.getText();
- if (i != mMessages.size() - 1) {
- completeMessage.insert(0, "\n");
- }
- completeMessage.insert(0, line);
+ SpannableStringBuilder completeMessage = new SpannableStringBuilder();
+ boolean showNames = mConversationTitle != null
+ || hasMessagesWithoutSender();
+ for (int i = mMessages.size() - 1; i >= 0; i--) {
+ Message message = mMessages.get(i);
+ CharSequence line;
+ line = showNames ? makeMessageLine(message) : message.getText();
+ if (i != mMessages.size() - 1) {
+ completeMessage.insert(0, "\n");
}
- Notification.BigTextStyle style =
- Api16Impl.createBigTextStyle(builder.getBuilder());
- style = Api16Impl.setBigContentTitle(style, null);
- Api16Impl.bigText(style, completeMessage);
+ completeMessage.insert(0, line);
}
+ Notification.Builder builder1 = builder.getBuilder();
+ Notification.BigTextStyle style =
+ new Notification.BigTextStyle(builder1);
+ style = style.setBigContentTitle(null);
+ style.bigText(completeMessage);
}
}
@@ -4541,38 +4438,6 @@
/**
* A class for wrapping calls to {@link Notification.MessagingStyle} methods which
- * were added in API 16; these calls must be wrapped to avoid performance issues.
- * See the UnsafeNewApiCall lint rule for more details.
- */
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() { }
-
- @DoNotInline
- static void setBuilder(Notification.Style style, Notification.Builder builder) {
- style.setBuilder(builder);
- }
-
- @DoNotInline
- static Notification.BigTextStyle createBigTextStyle(Notification.Builder builder) {
- return new Notification.BigTextStyle(builder);
- }
-
- @DoNotInline
- static Notification.BigTextStyle setBigContentTitle(
- Notification.BigTextStyle bigTextStyle, CharSequence title) {
- return bigTextStyle.setBigContentTitle(title);
- }
-
- @DoNotInline
- static Notification.BigTextStyle bigText(
- Notification.BigTextStyle bigTextStyle, CharSequence cs) {
- return bigTextStyle.bigText(cs);
- }
- }
-
- /**
- * A class for wrapping calls to {@link Notification.MessagingStyle} methods which
* were added in API 24; these calls must be wrapped to avoid performance issues.
* See the UnsafeNewApiCall lint rule for more details.
*/
@@ -5009,7 +4874,7 @@
}
}
if (style != null) {
- Api16Impl.setBuilder(style, builderAccessor.getBuilder());
+ style.setBuilder(builderAccessor.getBuilder());
if (mAnswerButtonColor != null) {
Api31Impl.setAnswerButtonColorHint(style, mAnswerButtonColor);
}
@@ -5206,20 +5071,6 @@
return resultActions;
}
- /**
- * A class for wrapping calls to {@link Notification.CallStyle} methods which
- * were added in API 16; these calls must be wrapped to avoid performance issues.
- * See the UnsafeNewApiCall lint rule for more details.
- */
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() { }
-
- @DoNotInline
- static void setBuilder(Notification.CallStyle style, Notification.Builder builder) {
- style.setBuilder(builder);
- }
- }
/**
* A class for wrapping calls to {@link Notification.CallStyle} methods which
@@ -5493,15 +5344,14 @@
@RestrictTo(LIBRARY_GROUP_PREFIX)
@Override
public void apply(NotificationBuilderWithBuilderAccessor builder) {
- if (Build.VERSION.SDK_INT >= 16) {
- Notification.InboxStyle style = Api16Impl.createInboxStyle(builder.getBuilder());
- style = Api16Impl.setBigContentTitle(style, mBigContentTitle);
- if (mSummaryTextSet) {
- Api16Impl.setSummaryText(style, mSummaryText);
- }
- for (CharSequence text: mTexts) {
- Api16Impl.addLine(style, text);
- }
+ Notification.Builder builder1 = builder.getBuilder();
+ Notification.InboxStyle style = new Notification.InboxStyle(builder1);
+ style = style.setBigContentTitle(mBigContentTitle);
+ if (mSummaryTextSet) {
+ style.setSummaryText(mSummaryText);
+ }
+ for (CharSequence text: mTexts) {
+ style.addLine(text);
}
}
@@ -5526,39 +5376,6 @@
super.clearCompatExtraKeys(extras);
extras.remove(EXTRA_TEXT_LINES);
}
-
- /**
- * A class for wrapping calls to {@link Notification.InboxStyle} methods which
- * were added in API 16; these calls must be wrapped to avoid performance issues.
- * See the UnsafeNewApiCall lint rule for more details.
- */
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() { }
-
- @DoNotInline
- static Notification.InboxStyle createInboxStyle(Notification.Builder builder) {
- return new Notification.InboxStyle(builder);
- }
-
- @DoNotInline
- static Notification.InboxStyle setBigContentTitle(Notification.InboxStyle inboxStyle,
- CharSequence title) {
- return inboxStyle.setBigContentTitle(title);
- }
-
- @DoNotInline
- static Notification.InboxStyle setSummaryText(Notification.InboxStyle inboxStyle,
- CharSequence cs) {
- return inboxStyle.setSummaryText(cs);
- }
-
- @DoNotInline
- static Notification.InboxStyle addLine(Notification.InboxStyle inboxStyle,
- CharSequence cs) {
- return inboxStyle.addLine(cs);
- }
- }
}
/**
diff --git a/core/core/src/main/java/androidx/core/app/NotificationCompatBuilder.java b/core/core/src/main/java/androidx/core/app/NotificationCompatBuilder.java
index edb7913..44e387b 100644
--- a/core/core/src/main/java/androidx/core/app/NotificationCompatBuilder.java
+++ b/core/core/src/main/java/androidx/core/app/NotificationCompatBuilder.java
@@ -57,13 +57,9 @@
private final Notification.Builder mBuilder;
private final NotificationCompat.Builder mBuilderCompat;
- // @RequiresApi(16) - uncomment when lint bug is fixed.
private RemoteViews mContentView;
- // @RequiresApi(16) - uncomment when lint bug is fixed.
private RemoteViews mBigContentView;
- // @RequiresApi(16) - uncomment when lint bug is fixed.
private final List<Bundle> mActionExtrasList = new ArrayList<>();
- // @RequiresApi(16) - uncomment when lint bug is fixed.
private final Bundle mExtras = new Bundle();
// @RequiresApi(20) - uncomment when lint bug is fixed.
private int mGroupAlertBehavior;
@@ -108,55 +104,54 @@
if (Build.VERSION.SDK_INT < 21) {
mBuilder.setSound(n.sound, n.audioStreamType);
}
- if (Build.VERSION.SDK_INT >= 16) {
- Api16Impl.setPriority(
- Api16Impl.setUsesChronometer(Api16Impl.setSubText(mBuilder, b.mSubText),
- b.mUseChronometer), b.mPriority);
- // CallStyle notifications add special actions in pre-specified positions, in addition
- // to any provided custom actions. Because there's no way to remove Actions once they're
- // added to Notification.Builder in Versions < 24, we add them here where we have
- // access to NotificationCompatBuilder, rather than in CallStyle.apply where we have
- // to add to the Notification.Builder directly.
- if (Build.VERSION.SDK_INT >= 20
- && (b.mStyle instanceof NotificationCompat.CallStyle)) {
- // Retrieves call style actions, including contextual and system actions.
- List<NotificationCompat.Action> actionsList =
- ((NotificationCompat.CallStyle) b.mStyle).getActionsListWithSystemActions();
- // Adds the actions to the builder in the proper order.
- for (NotificationCompat.Action action : actionsList) {
- addAction(action);
- }
- } else {
- for (NotificationCompat.Action action : b.mActions) {
- addAction(action);
- }
- }
+ Notification.Builder builder = mBuilder.setSubText(b.mSubText);
+ Notification.Builder builder1 = builder.setUsesChronometer(b.mUseChronometer);
+ builder1.setPriority(b.mPriority);
- if (b.mExtras != null) {
- mExtras.putAll(b.mExtras);
+ // CallStyle notifications add special actions in pre-specified positions, in addition
+ // to any provided custom actions. Because there's no way to remove Actions once they're
+ // added to Notification.Builder in Versions < 24, we add them here where we have
+ // access to NotificationCompatBuilder, rather than in CallStyle.apply where we have
+ // to add to the Notification.Builder directly.
+ if (Build.VERSION.SDK_INT >= 20
+ && (b.mStyle instanceof NotificationCompat.CallStyle)) {
+ // Retrieves call style actions, including contextual and system actions.
+ List<NotificationCompat.Action> actionsList =
+ ((NotificationCompat.CallStyle) b.mStyle).getActionsListWithSystemActions();
+ // Adds the actions to the builder in the proper order.
+ for (NotificationCompat.Action action : actionsList) {
+ addAction(action);
}
- if (Build.VERSION.SDK_INT < 20) {
- if (b.mLocalOnly) {
- mExtras.putBoolean(NotificationCompatExtras.EXTRA_LOCAL_ONLY, true);
- }
- if (b.mGroupKey != null) {
- mExtras.putString(NotificationCompatExtras.EXTRA_GROUP_KEY, b.mGroupKey);
- if (b.mGroupSummary) {
- mExtras.putBoolean(NotificationCompatExtras.EXTRA_GROUP_SUMMARY, true);
- } else {
- mExtras.putBoolean(
- NotificationManagerCompat.EXTRA_USE_SIDE_CHANNEL, true);
- }
- }
- if (b.mSortKey != null) {
- mExtras.putString(NotificationCompatExtras.EXTRA_SORT_KEY, b.mSortKey);
- }
+ } else {
+ for (NotificationCompat.Action action : b.mActions) {
+ addAction(action);
}
-
- mContentView = b.mContentView;
- mBigContentView = b.mBigContentView;
}
+
+ if (b.mExtras != null) {
+ mExtras.putAll(b.mExtras);
+ }
+ if (Build.VERSION.SDK_INT < 20) {
+ if (b.mLocalOnly) {
+ mExtras.putBoolean(NotificationCompatExtras.EXTRA_LOCAL_ONLY, true);
+ }
+ if (b.mGroupKey != null) {
+ mExtras.putString(NotificationCompatExtras.EXTRA_GROUP_KEY, b.mGroupKey);
+ if (b.mGroupSummary) {
+ mExtras.putBoolean(NotificationCompatExtras.EXTRA_GROUP_SUMMARY, true);
+ } else {
+ mExtras.putBoolean(
+ NotificationManagerCompat.EXTRA_USE_SIDE_CHANNEL, true);
+ }
+ }
+ if (b.mSortKey != null) {
+ mExtras.putString(NotificationCompatExtras.EXTRA_SORT_KEY, b.mSortKey);
+ }
+ }
+
+ mContentView = b.mContentView;
+ mBigContentView = b.mBigContentView;
mBuilder.setShowWhen(b.mShowWhen);
if (Build.VERSION.SDK_INT < 21) {
final List<String> people = combineLists(getPeople(b.mPersonList), b.mPeople);
@@ -432,9 +427,9 @@
@SuppressWarnings("deprecation")
protected Notification buildInternal() {
if (Build.VERSION.SDK_INT >= 26) {
- return Api16Impl.build(mBuilder);
+ return mBuilder.build();
} else if (Build.VERSION.SDK_INT >= 24) {
- Notification notification = Api16Impl.build(mBuilder);
+ Notification notification = mBuilder.build();
if (mGroupAlertBehavior != GROUP_ALERT_ALL) {
// if is summary and only children should alert
@@ -454,7 +449,7 @@
return notification;
} else if (Build.VERSION.SDK_INT >= 21) {
mBuilder.setExtras(mExtras);
- Notification notification = Api16Impl.build(mBuilder);
+ Notification notification = mBuilder.build();
if (mContentView != null) {
notification.contentView = mContentView;
}
@@ -482,7 +477,7 @@
return notification;
} else if (Build.VERSION.SDK_INT >= 20) {
mBuilder.setExtras(mExtras);
- Notification notification = Api16Impl.build(mBuilder);
+ Notification notification = mBuilder.build();
if (mContentView != null) {
notification.contentView = mContentView;
}
@@ -515,7 +510,7 @@
NotificationCompatExtras.EXTRA_ACTION_EXTRAS, actionExtrasMap);
}
mBuilder.setExtras(mExtras);
- Notification notification = Api16Impl.build(mBuilder);
+ Notification notification = mBuilder.build();
if (mContentView != null) {
notification.contentView = mContentView;
}
@@ -535,36 +530,6 @@
/**
* A class for wrapping calls to {@link NotificationCompatBuilder} methods which
- * were added in API 16; these calls must be wrapped to avoid performance issues.
- * See the UnsafeNewApiCall lint rule for more details.
- */
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() { }
-
- @DoNotInline
- static Notification.Builder setSubText(Notification.Builder builder, CharSequence text) {
- return builder.setSubText(text);
- }
-
- @DoNotInline
- static Notification.Builder setUsesChronometer(Notification.Builder builder, boolean b) {
- return builder.setUsesChronometer(b);
- }
-
- @DoNotInline
- static Notification.Builder setPriority(Notification.Builder builder, int pri) {
- return builder.setPriority(pri);
- }
-
- @DoNotInline
- static Notification build(Notification.Builder builder) {
- return builder.build();
- }
- }
-
- /**
- * A class for wrapping calls to {@link NotificationCompatBuilder} methods which
* were added in API 20; these calls must be wrapped to avoid performance issues.
* See the UnsafeNewApiCall lint rule for more details.
*/
diff --git a/core/core/src/main/java/androidx/core/app/NotificationCompatJellybean.java b/core/core/src/main/java/androidx/core/app/NotificationCompatJellybean.java
index 179dc5c..7b807d4 100644
--- a/core/core/src/main/java/androidx/core/app/NotificationCompatJellybean.java
+++ b/core/core/src/main/java/androidx/core/app/NotificationCompatJellybean.java
@@ -23,7 +23,6 @@
import android.util.Log;
import android.util.SparseArray;
-import androidx.annotation.RequiresApi;
import androidx.core.graphics.drawable.IconCompat;
import java.lang.reflect.Field;
@@ -33,7 +32,6 @@
import java.util.List;
import java.util.Set;
-@RequiresApi(16)
class NotificationCompatJellybean {
public static final String TAG = "NotificationCompat";
diff --git a/core/core/src/main/java/androidx/core/app/RemoteInput.java b/core/core/src/main/java/androidx/core/app/RemoteInput.java
index c7a2872..a0ade5f 100644
--- a/core/core/src/main/java/androidx/core/app/RemoteInput.java
+++ b/core/core/src/main/java/androidx/core/app/RemoteInput.java
@@ -344,7 +344,7 @@
@NonNull Intent intent, @NonNull String remoteInputResultKey) {
if (Build.VERSION.SDK_INT >= 26) {
return Api26Impl.getDataResultsFromIntent(intent, remoteInputResultKey);
- } else if (Build.VERSION.SDK_INT >= 16) {
+ } else {
Intent clipDataIntent = getClipDataIntentFromIntent(intent);
if (clipDataIntent == null) {
return null;
@@ -366,8 +366,6 @@
}
}
return results.isEmpty() ? null : results;
- } else {
- return null;
}
}
@@ -385,14 +383,12 @@
public static Bundle getResultsFromIntent(@NonNull Intent intent) {
if (Build.VERSION.SDK_INT >= 20) {
return Api20Impl.getResultsFromIntent(intent);
- } else if (Build.VERSION.SDK_INT >= 16) {
+ } else {
Intent clipDataIntent = getClipDataIntentFromIntent(intent);
if (clipDataIntent == null) {
return null;
}
return clipDataIntent.getExtras().getParcelable(RemoteInput.EXTRA_RESULTS_DATA);
- } else {
- return null;
}
}
@@ -442,7 +438,7 @@
// Now restore the results source.
setResultsSource(intent, resultsSource);
- } else if (Build.VERSION.SDK_INT >= 16) {
+ } else {
Intent clipDataIntent = getClipDataIntentFromIntent(intent);
if (clipDataIntent == null) {
clipDataIntent = new Intent(); // First time we've added a result.
@@ -459,8 +455,7 @@
}
}
clipDataIntent.putExtra(RemoteInput.EXTRA_RESULTS_DATA, resultsBundle);
- Api16Impl.setClipData(intent,
- ClipData.newIntent(RemoteInput.RESULTS_CLIP_LABEL, clipDataIntent));
+ intent.setClipData(ClipData.newIntent(RemoteInput.RESULTS_CLIP_LABEL, clipDataIntent));
}
}
@@ -476,7 +471,7 @@
@NonNull Intent intent, @NonNull Map<String, Uri> results) {
if (Build.VERSION.SDK_INT >= 26) {
Api26Impl.addDataResultToIntent(remoteInput, intent, results);
- } else if (Build.VERSION.SDK_INT >= 16) {
+ } else {
Intent clipDataIntent = getClipDataIntentFromIntent(intent);
if (clipDataIntent == null) {
clipDataIntent = new Intent(); // First time we've added a result.
@@ -495,8 +490,7 @@
resultsBundle.putString(remoteInput.getResultKey(), uri.toString());
clipDataIntent.putExtra(getExtraResultsKeyForData(mimeType), resultsBundle);
}
- Api16Impl.setClipData(intent,
- ClipData.newIntent(RemoteInput.RESULTS_CLIP_LABEL, clipDataIntent));
+ intent.setClipData(ClipData.newIntent(RemoteInput.RESULTS_CLIP_LABEL, clipDataIntent));
}
}
@@ -516,13 +510,13 @@
public static void setResultsSource(@NonNull Intent intent, @Source int source) {
if (Build.VERSION.SDK_INT >= 28) {
Api28Impl.setResultsSource(intent, source);
- } else if (Build.VERSION.SDK_INT >= 16) {
+ } else {
Intent clipDataIntent = getClipDataIntentFromIntent(intent);
if (clipDataIntent == null) {
clipDataIntent = new Intent(); // First time we've added a result.
}
clipDataIntent.putExtra(EXTRA_RESULTS_SOURCE, source);
- Api16Impl.setClipData(intent, ClipData.newIntent(RESULTS_CLIP_LABEL, clipDataIntent));
+ intent.setClipData(ClipData.newIntent(RESULTS_CLIP_LABEL, clipDataIntent));
}
}
@@ -541,14 +535,12 @@
public static int getResultsSource(@NonNull Intent intent) {
if (Build.VERSION.SDK_INT >= 28) {
return Api28Impl.getResultsSource(intent);
- } else if (Build.VERSION.SDK_INT >= 16) {
+ } else {
Intent clipDataIntent = getClipDataIntentFromIntent(intent);
if (clipDataIntent == null) {
return SOURCE_FREE_FORM_INPUT;
}
return clipDataIntent.getExtras().getInt(EXTRA_RESULTS_SOURCE, SOURCE_FREE_FORM_INPUT);
- } else {
- return SOURCE_FREE_FORM_INPUT;
}
}
@@ -578,9 +570,8 @@
return Api20Impl.fromPlatform(src);
}
- @RequiresApi(16)
private static Intent getClipDataIntentFromIntent(Intent intent) {
- ClipData clipData = Api16Impl.getClipData(intent);
+ ClipData clipData = intent.getClipData();
if (clipData == null) {
return null;
}
@@ -685,23 +676,6 @@
}
}
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() {
- // This class is not instantiable.
- }
-
- @DoNotInline
- static ClipData getClipData(Intent intent) {
- return intent.getClipData();
- }
-
- @DoNotInline
- static void setClipData(Intent intent, ClipData clip) {
- intent.setClipData(clip);
- }
- }
-
@RequiresApi(29)
static class Api29Impl {
private Api29Impl() {
diff --git a/core/core/src/main/java/androidx/core/os/HandlerCompat.java b/core/core/src/main/java/androidx/core/os/HandlerCompat.java
index 3106865..76b11e8 100644
--- a/core/core/src/main/java/androidx/core/os/HandlerCompat.java
+++ b/core/core/src/main/java/androidx/core/os/HandlerCompat.java
@@ -208,13 +208,12 @@
* @return {@code true} if the callback is in the message queue
* @see Handler#hasCallbacks(Runnable)
*/
- @RequiresApi(16)
public static boolean hasCallbacks(@NonNull Handler handler, @NonNull Runnable r) {
Exception wrappedException = null;
if (Build.VERSION.SDK_INT >= 29) {
return Api29Impl.hasCallbacks(handler, r);
- } else if (Build.VERSION.SDK_INT >= 16) {
+ } else {
// The method signature didn't change when it was made public in SDK 29, but use
// reflection so that we don't cause a verification error or NotFound exception if an
// OEM changed something.
diff --git a/core/core/src/main/java/androidx/core/view/AccessibilityDelegateCompat.java b/core/core/src/main/java/androidx/core/view/AccessibilityDelegateCompat.java
index 8102330..da8f831 100644
--- a/core/core/src/main/java/androidx/core/view/AccessibilityDelegateCompat.java
+++ b/core/core/src/main/java/androidx/core/view/AccessibilityDelegateCompat.java
@@ -32,7 +32,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
import androidx.core.R;
import androidx.core.view.accessibility.AccessibilityClickableSpanCompat;
@@ -117,7 +116,6 @@
}
@Override
- @RequiresApi(16)
public AccessibilityNodeProvider getAccessibilityNodeProvider(View host) {
AccessibilityNodeProviderCompat provider =
mCompat.getAccessibilityNodeProvider(host);
diff --git a/core/core/src/main/java/androidx/core/view/accessibility/AccessibilityNodeProviderCompat.java b/core/core/src/main/java/androidx/core/view/accessibility/AccessibilityNodeProviderCompat.java
index 77eba4d..6d44092 100644
--- a/core/core/src/main/java/androidx/core/view/accessibility/AccessibilityNodeProviderCompat.java
+++ b/core/core/src/main/java/androidx/core/view/accessibility/AccessibilityNodeProviderCompat.java
@@ -37,11 +37,11 @@
* accessibility services and managing accessibility focus. </aside>
*/
public class AccessibilityNodeProviderCompat {
- @RequiresApi(16)
- static class AccessibilityNodeProviderApi16 extends AccessibilityNodeProvider {
+
+ static class AccessibilityNodeProviderApi19 extends AccessibilityNodeProvider {
final AccessibilityNodeProviderCompat mCompat;
- AccessibilityNodeProviderApi16(AccessibilityNodeProviderCompat compat) {
+ AccessibilityNodeProviderApi19(AccessibilityNodeProviderCompat compat) {
mCompat = compat;
}
@@ -78,13 +78,6 @@
public boolean performAction(int virtualViewId, int action, Bundle arguments) {
return mCompat.performAction(virtualViewId, action, arguments);
}
- }
-
- @RequiresApi(19)
- static class AccessibilityNodeProviderApi19 extends AccessibilityNodeProviderApi16 {
- AccessibilityNodeProviderApi19(AccessibilityNodeProviderCompat compat) {
- super(compat);
- }
@Override
public AccessibilityNodeInfo findFocus(int focus) {
diff --git a/credentials/credentials/api/current.txt b/credentials/credentials/api/current.txt
index 8c9cf86..61e0534 100644
--- a/credentials/credentials/api/current.txt
+++ b/credentials/credentials/api/current.txt
@@ -94,7 +94,7 @@
property public final String type;
}
- @RequiresApi(16) public interface CredentialManager {
+ public interface CredentialManager {
method public default suspend Object? clearCredentialState(androidx.credentials.ClearCredentialStateRequest request, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void clearCredentialStateAsync(androidx.credentials.ClearCredentialStateRequest request, android.os.CancellationSignal? cancellationSignal, java.util.concurrent.Executor executor, androidx.credentials.CredentialManagerCallback<java.lang.Void,androidx.credentials.exceptions.ClearCredentialException> callback);
method public static androidx.credentials.CredentialManager create(android.content.Context context);
diff --git a/credentials/credentials/api/restricted_current.txt b/credentials/credentials/api/restricted_current.txt
index 8c9cf86..61e0534 100644
--- a/credentials/credentials/api/restricted_current.txt
+++ b/credentials/credentials/api/restricted_current.txt
@@ -94,7 +94,7 @@
property public final String type;
}
- @RequiresApi(16) public interface CredentialManager {
+ public interface CredentialManager {
method public default suspend Object? clearCredentialState(androidx.credentials.ClearCredentialStateRequest request, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public void clearCredentialStateAsync(androidx.credentials.ClearCredentialStateRequest request, android.os.CancellationSignal? cancellationSignal, java.util.concurrent.Executor executor, androidx.credentials.CredentialManagerCallback<java.lang.Void,androidx.credentials.exceptions.ClearCredentialException> callback);
method public static androidx.credentials.CredentialManager create(android.content.Context context);
diff --git a/credentials/credentials/src/main/java/androidx/credentials/CredentialManager.kt b/credentials/credentials/src/main/java/androidx/credentials/CredentialManager.kt
index 3a72c78..27da8fc 100644
--- a/credentials/credentials/src/main/java/androidx/credentials/CredentialManager.kt
+++ b/credentials/credentials/src/main/java/androidx/credentials/CredentialManager.kt
@@ -83,7 +83,6 @@
*
*
*/
-@RequiresApi(16)
@SuppressLint("ObsoleteSdkInt") // Accommodate dependencies with a lower min sdk requirement
interface CredentialManager {
companion object {
diff --git a/credentials/credentials/src/main/java/androidx/credentials/CredentialManagerImpl.kt b/credentials/credentials/src/main/java/androidx/credentials/CredentialManagerImpl.kt
index f39f2ef..ad3b56e 100644
--- a/credentials/credentials/src/main/java/androidx/credentials/CredentialManagerImpl.kt
+++ b/credentials/credentials/src/main/java/androidx/credentials/CredentialManagerImpl.kt
@@ -85,7 +85,6 @@
*
*
*/
-@RequiresApi(16)
@SuppressLint("ObsoleteSdkInt") // Accommodate dependencies with a lower min sdk requirement
internal class CredentialManagerImpl internal constructor(
private val context: Context
diff --git a/fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.kt b/fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.kt
index 61da32d..a098d19 100644
--- a/fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.kt
+++ b/fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.kt
@@ -28,7 +28,6 @@
import androidx.activity.BackEventCompat
import androidx.annotation.AnimatorRes
import androidx.annotation.LayoutRes
-import androidx.annotation.RequiresApi
import androidx.core.view.ViewCompat
import androidx.fragment.app.test.FragmentTestActivity
import androidx.fragment.test.R
@@ -148,7 +147,6 @@
// Ensure that showing and popping a Fragment uses the enter and popExit animators
// This tests reordered transactions
- @RequiresApi(16)
@Test
fun showAnimatorsReordered() {
val fm = activityRule.activity.supportFragmentManager
@@ -192,7 +190,6 @@
// Ensure that showing and popping a Fragment uses the enter and popExit animators
// This tests ordered transactions
- @RequiresApi(16)
@Test
fun showAnimatorsOrdered() {
val fm = activityRule.activity.supportFragmentManager
diff --git a/fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentTest.kt b/fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentTest.kt
index 7d34ca7..e0b9d9b 100644
--- a/fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentTest.kt
+++ b/fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentTest.kt
@@ -19,7 +19,6 @@
import android.os.Bundle
import android.view.ViewGroup
import android.view.ViewTreeObserver
-import androidx.annotation.RequiresApi
import androidx.fragment.app.test.FragmentTestActivity
import androidx.fragment.test.R
import androidx.test.annotation.UiThreadTest
@@ -197,7 +196,6 @@
}
}
- @RequiresApi(16) // ViewTreeObserver.OnDrawListener was added in API 16
private fun waitForHalfFadeIn(fragment: Fragment) {
if (fragment.view == null) {
activityRule.waitForExecution()
diff --git a/metrics/metrics-performance/src/main/java/androidx/metrics/performance/JankStatsApi16Impl.kt b/metrics/metrics-performance/src/main/java/androidx/metrics/performance/JankStatsApi16Impl.kt
index c2999cf6..0dad2bc 100644
--- a/metrics/metrics-performance/src/main/java/androidx/metrics/performance/JankStatsApi16Impl.kt
+++ b/metrics/metrics-performance/src/main/java/androidx/metrics/performance/JankStatsApi16Impl.kt
@@ -21,7 +21,6 @@
import android.view.Choreographer
import android.view.View
import android.view.ViewTreeObserver
-import androidx.annotation.RequiresApi
import java.lang.ref.WeakReference
import java.lang.reflect.Field
@@ -145,7 +144,6 @@
* timing details. This listener delegates to a list of OnFrameListenerDelegate objects,
* which do the work of sending that data to JankStats instance clients.
*/
-@RequiresApi(16)
internal open class DelegatingOnPreDrawListener(
decorView: View,
val choreographer: Choreographer,
diff --git a/print/print/src/main/java/androidx/print/PrintHelper.java b/print/print/src/main/java/androidx/print/PrintHelper.java
index 6a0aa14..44ced2a 100644
--- a/print/print/src/main/java/androidx/print/PrintHelper.java
+++ b/print/print/src/main/java/androidx/print/PrintHelper.java
@@ -640,7 +640,7 @@
@Override
protected Throwable doInBackground(Void... params) {
try {
- if (Api16Impl.isCanceled(cancellationSignal)) {
+ if (cancellationSignal.isCanceled()) {
return null;
}
@@ -650,7 +650,7 @@
Bitmap maybeGrayscale = convertBitmapForColorMode(bitmap,
Api19Impl.getColorMode(pdfAttributes));
- if (Api16Impl.isCanceled(cancellationSignal)) {
+ if (cancellationSignal.isCanceled()) {
return null;
}
@@ -695,7 +695,7 @@
// Finish the page.
Api19Impl.finishPage(pdfDocument, page);
- if (Api16Impl.isCanceled(cancellationSignal)) {
+ if (cancellationSignal.isCanceled()) {
return null;
}
@@ -725,7 +725,7 @@
@Override
protected void onPostExecute(Throwable throwable) {
- if (Api16Impl.isCanceled(cancellationSignal)) {
+ if (cancellationSignal.isCanceled()) {
// Cancelled.
Api19Impl.onWriteCancelled(writeResultCallback);
} else if (throwable == null) {
@@ -841,19 +841,6 @@
return grayscale;
}
- @RequiresApi(16)
- static class Api16Impl {
- private Api16Impl() {
- // This class is not instantiable.
- }
-
- @DoNotInline
- static boolean isCanceled(CancellationSignal cancellationSignal) {
- return cancellationSignal.isCanceled();
- }
-
- }
-
@RequiresApi(19)
private static class Api19Impl {
private Api19Impl() {
diff --git a/profileinstaller/profileinstaller/src/main/java/androidx/profileinstaller/ProfileInstallerInitializer.java b/profileinstaller/profileinstaller/src/main/java/androidx/profileinstaller/ProfileInstallerInitializer.java
index c616738..d90e0ee 100644
--- a/profileinstaller/profileinstaller/src/main/java/androidx/profileinstaller/ProfileInstallerInitializer.java
+++ b/profileinstaller/profileinstaller/src/main/java/androidx/profileinstaller/ProfileInstallerInitializer.java
@@ -79,19 +79,11 @@
}
// If we made it this far, we are going to try and install the profile in the background,
// but delay a bit to avoid interfering with app startup work.
- delayAfterFirstFrame(context.getApplicationContext());
- return new Result();
- }
-
- /**
- * Wait until the first frame of the application to do anything.
- *
- * This allows startup code to run before the delay is scheduled.
- */
- @RequiresApi(16)
- void delayAfterFirstFrame(@NonNull Context appContext) {
+ Context appContext = context.getApplicationContext();
// schedule delay after first frame callback
- Choreographer16Impl.postFrameCallback(() -> installAfterDelay(appContext));
+ Choreographer.getInstance().postFrameCallback(frameTimeNanos ->
+ installAfterDelay(appContext));
+ return new Result();
}
/**
@@ -150,17 +142,6 @@
*/
public static class Result { }
- @RequiresApi(16)
- private static class Choreographer16Impl {
- private Choreographer16Impl() {
- // Non-instantiable.
- }
-
- @DoNotInline
- public static void postFrameCallback(Runnable r) {
- Choreographer.getInstance().postFrameCallback(frameTimeNanos -> r.run());
- }
- }
@RequiresApi(28)
private static class Handler28Impl {
diff --git a/room/room-common/api/current.txt b/room/room-common/api/current.txt
index a00c4db..0106179 100644
--- a/room/room-common/api/current.txt
+++ b/room/room-common/api/current.txt
@@ -178,14 +178,14 @@
field public static final int SET_NULL = 3; // 0x3
}
- @RequiresApi(16) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Fts3 {
+ @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Fts3 {
method public abstract String tokenizer() default androidx.room.FtsOptions.TOKENIZER_SIMPLE;
method public abstract String[] tokenizerArgs();
property public abstract String tokenizer;
property public abstract String[] tokenizerArgs;
}
- @RequiresApi(16) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Fts4 {
+ @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Fts4 {
method public abstract Class<?> contentEntity() default java.lang.Object;
method public abstract String languageId() default "";
method public abstract androidx.room.FtsOptions.MatchInfo matchInfo() default androidx.room.FtsOptions.MatchInfo.FTS4;
@@ -413,7 +413,7 @@
property @androidx.room.OnConflictStrategy public abstract int onConflict;
}
- @RequiresApi(16) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface Upsert {
+ @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface Upsert {
method public abstract Class<?> entity() default java.lang.Object;
property public abstract Class<?> entity;
}
diff --git a/room/room-common/api/restricted_current.txt b/room/room-common/api/restricted_current.txt
index 4512daa..c4ee79a 100644
--- a/room/room-common/api/restricted_current.txt
+++ b/room/room-common/api/restricted_current.txt
@@ -178,14 +178,14 @@
field public static final int SET_NULL = 3; // 0x3
}
- @RequiresApi(16) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Fts3 {
+ @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Fts3 {
method public abstract String tokenizer() default androidx.room.FtsOptions.TOKENIZER_SIMPLE;
method public abstract String[] tokenizerArgs();
property public abstract String tokenizer;
property public abstract String[] tokenizerArgs;
}
- @RequiresApi(16) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Fts4 {
+ @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.CLASS) public @interface Fts4 {
method public abstract Class<?> contentEntity() default java.lang.Object;
method public abstract String languageId() default "";
method public abstract androidx.room.FtsOptions.MatchInfo matchInfo() default androidx.room.FtsOptions.MatchInfo.FTS4;
@@ -423,7 +423,7 @@
property @androidx.room.OnConflictStrategy public abstract int onConflict;
}
- @RequiresApi(16) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface Upsert {
+ @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public @interface Upsert {
method public abstract Class<?> entity() default java.lang.Object;
property public abstract Class<?> entity;
}
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/Fts3.kt b/room/room-common/src/commonMain/kotlin/androidx/room/Fts3.kt
index e1d9f17..cfc7b88 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/Fts3.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/Fts3.kt
@@ -16,7 +16,6 @@
package androidx.room
-import androidx.annotation.RequiresApi
import androidx.room.FtsOptions.TOKENIZER_SIMPLE
/**
@@ -56,7 +55,6 @@
*/
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
-@RequiresApi(16)
public annotation class Fts3(
/**
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/Fts4.kt b/room/room-common/src/commonMain/kotlin/androidx/room/Fts4.kt
index fcd8895..87d2f9f 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/Fts4.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/Fts4.kt
@@ -16,7 +16,6 @@
package androidx.room
-import androidx.annotation.RequiresApi
import androidx.room.FtsOptions.TOKENIZER_SIMPLE
import kotlin.reflect.KClass
@@ -58,7 +57,6 @@
*/
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
-@RequiresApi(16)
public annotation class Fts4(
/**
diff --git a/room/room-common/src/commonMain/kotlin/androidx/room/Upsert.kt b/room/room-common/src/commonMain/kotlin/androidx/room/Upsert.kt
index ea478af..117159e 100644
--- a/room/room-common/src/commonMain/kotlin/androidx/room/Upsert.kt
+++ b/room/room-common/src/commonMain/kotlin/androidx/room/Upsert.kt
@@ -16,7 +16,6 @@
package androidx.room
-import androidx.annotation.RequiresApi
import kotlin.reflect.KClass
/**
@@ -83,7 +82,6 @@
*/
@Target(AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.BINARY)
-@RequiresApi(16)
public annotation class Upsert(
/**
diff --git a/slice/slice-core/api/current.txt b/slice/slice-core/api/current.txt
index bc4b051..751fa32 100644
--- a/slice/slice-core/api/current.txt
+++ b/slice/slice-core/api/current.txt
@@ -43,22 +43,22 @@
ctor @Deprecated public SliceProvider();
ctor @Deprecated public SliceProvider(java.lang.String!...);
method @Deprecated public final int bulkInsert(android.net.Uri, android.content.ContentValues![]);
- method @Deprecated @RequiresApi(19) public final android.net.Uri? canonicalize(android.net.Uri);
+ method @Deprecated public final android.net.Uri? canonicalize(android.net.Uri);
method @Deprecated public final int delete(android.net.Uri, String?, String![]?);
- method @Deprecated @RequiresApi(19) public java.util.List<android.net.Uri!> getPinnedSlices();
+ method @Deprecated public java.util.List<android.net.Uri!> getPinnedSlices();
method @Deprecated public final String? getType(android.net.Uri);
method @Deprecated public final android.net.Uri? insert(android.net.Uri, android.content.ContentValues?);
- method @Deprecated @RequiresApi(19) public abstract androidx.slice.Slice? onBindSlice(android.net.Uri);
+ method @Deprecated public abstract androidx.slice.Slice? onBindSlice(android.net.Uri);
method @Deprecated public final boolean onCreate();
method @Deprecated public android.app.PendingIntent? onCreatePermissionRequest(android.net.Uri, String);
- method @Deprecated @RequiresApi(19) public abstract boolean onCreateSliceProvider();
- method @Deprecated @RequiresApi(19) public java.util.Collection<android.net.Uri!> onGetSliceDescendants(android.net.Uri);
- method @Deprecated @RequiresApi(19) public android.net.Uri onMapIntentToUri(android.content.Intent);
- method @Deprecated @RequiresApi(19) public void onSlicePinned(android.net.Uri);
- method @Deprecated @RequiresApi(19) public void onSliceUnpinned(android.net.Uri);
+ method @Deprecated public abstract boolean onCreateSliceProvider();
+ method @Deprecated public java.util.Collection<android.net.Uri!> onGetSliceDescendants(android.net.Uri);
+ method @Deprecated public android.net.Uri onMapIntentToUri(android.content.Intent);
+ method @Deprecated public void onSlicePinned(android.net.Uri);
+ method @Deprecated public void onSliceUnpinned(android.net.Uri);
method @Deprecated @RequiresApi(28) public final android.database.Cursor? query(android.net.Uri, String![]?, android.os.Bundle?, android.os.CancellationSignal?);
method @Deprecated public final android.database.Cursor? query(android.net.Uri, String![]?, String?, String![]?, String?);
- method @Deprecated @RequiresApi(16) public final android.database.Cursor? query(android.net.Uri, String![]?, String?, String![]?, String?, android.os.CancellationSignal?);
+ method @Deprecated public final android.database.Cursor? query(android.net.Uri, String![]?, String?, String![]?, String?, android.os.CancellationSignal?);
method @Deprecated public final int update(android.net.Uri, android.content.ContentValues?, String?, String![]?);
}
diff --git a/slice/slice-core/api/restricted_current.txt b/slice/slice-core/api/restricted_current.txt
index b000782..3d161e4 100644
--- a/slice/slice-core/api/restricted_current.txt
+++ b/slice/slice-core/api/restricted_current.txt
@@ -94,25 +94,25 @@
ctor @Deprecated public SliceProvider();
ctor @Deprecated public SliceProvider(java.lang.String!...);
method @Deprecated public final int bulkInsert(android.net.Uri, android.content.ContentValues![]);
- method @Deprecated @RequiresApi(19) public final android.net.Uri? canonicalize(android.net.Uri);
+ method @Deprecated public final android.net.Uri? canonicalize(android.net.Uri);
method @Deprecated public final int delete(android.net.Uri, String?, String![]?);
- method @Deprecated @RequiresApi(19) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public static androidx.slice.Clock? getClock();
- method @Deprecated @RequiresApi(19) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static java.util.Set<androidx.slice.SliceSpec!>? getCurrentSpecs();
- method @Deprecated @RequiresApi(19) public java.util.List<android.net.Uri!> getPinnedSlices();
+ method @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public static androidx.slice.Clock? getClock();
+ method @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static java.util.Set<androidx.slice.SliceSpec!>? getCurrentSpecs();
+ method @Deprecated public java.util.List<android.net.Uri!> getPinnedSlices();
method @Deprecated public final String? getType(android.net.Uri);
- method @RequiresApi(19) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY) public Object? getWrapper();
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY) public Object? getWrapper();
method @Deprecated public final android.net.Uri? insert(android.net.Uri, android.content.ContentValues?);
- method @Deprecated @RequiresApi(19) public abstract androidx.slice.Slice? onBindSlice(android.net.Uri);
+ method @Deprecated public abstract androidx.slice.Slice? onBindSlice(android.net.Uri);
method @Deprecated public final boolean onCreate();
method @Deprecated public android.app.PendingIntent? onCreatePermissionRequest(android.net.Uri, String);
- method @Deprecated @RequiresApi(19) public abstract boolean onCreateSliceProvider();
- method @Deprecated @RequiresApi(19) public java.util.Collection<android.net.Uri!> onGetSliceDescendants(android.net.Uri);
- method @Deprecated @RequiresApi(19) public android.net.Uri onMapIntentToUri(android.content.Intent);
- method @Deprecated @RequiresApi(19) public void onSlicePinned(android.net.Uri);
- method @Deprecated @RequiresApi(19) public void onSliceUnpinned(android.net.Uri);
+ method @Deprecated public abstract boolean onCreateSliceProvider();
+ method @Deprecated public java.util.Collection<android.net.Uri!> onGetSliceDescendants(android.net.Uri);
+ method @Deprecated public android.net.Uri onMapIntentToUri(android.content.Intent);
+ method @Deprecated public void onSlicePinned(android.net.Uri);
+ method @Deprecated public void onSliceUnpinned(android.net.Uri);
method @Deprecated @RequiresApi(28) public final android.database.Cursor? query(android.net.Uri, String![]?, android.os.Bundle?, android.os.CancellationSignal?);
method @Deprecated public final android.database.Cursor? query(android.net.Uri, String![]?, String?, String![]?, String?);
- method @Deprecated @RequiresApi(16) public final android.database.Cursor? query(android.net.Uri, String![]?, String?, String![]?, String?, android.os.CancellationSignal?);
+ method @Deprecated public final android.database.Cursor? query(android.net.Uri, String![]?, String?, String![]?, String?, android.os.CancellationSignal?);
method @Deprecated public final int update(android.net.Uri, android.content.ContentValues?, String?, String![]?);
}
@@ -154,7 +154,7 @@
method @Deprecated public java.util.Set<java.lang.String!> toPersistable();
}
- @Deprecated @RequiresApi(19) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public class SliceProviderCompat {
+ @Deprecated @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public class SliceProviderCompat {
ctor @Deprecated public SliceProviderCompat(androidx.slice.SliceProvider, androidx.slice.compat.CompatPermissionManager, android.content.Context);
method @Deprecated public static void addSpecs(android.os.Bundle, java.util.Set<androidx.slice.SliceSpec!>);
method @Deprecated public static androidx.slice.Slice? bindSlice(android.content.Context, android.content.Intent, java.util.Set<androidx.slice.SliceSpec!>);
diff --git a/slice/slice-core/src/main/java/androidx/slice/SliceProvider.java b/slice/slice-core/src/main/java/androidx/slice/SliceProvider.java
index edb4a01..5abc467 100644
--- a/slice/slice-core/src/main/java/androidx/slice/SliceProvider.java
+++ b/slice/slice-core/src/main/java/androidx/slice/SliceProvider.java
@@ -192,7 +192,6 @@
*
* @return true if the provider was successfully loaded, false otherwise
*/
- @RequiresApi(19)
public abstract boolean onCreateSliceProvider();
/**
@@ -200,7 +199,6 @@
@Nullable
@RestrictTo(RestrictTo.Scope.LIBRARY)
@Override
- @RequiresApi(19)
public Object getWrapper() {
if (Build.VERSION.SDK_INT >= 28) {
return new SliceProviderWrapperContainer.SliceProviderWrapper(this,
@@ -215,7 +213,6 @@
}
@NonNull
- @RequiresApi(19)
private SliceProviderCompat getSliceProviderCompat() {
synchronized (mCompatLock) {
if (mCompat == null) {
@@ -232,7 +229,6 @@
@NonNull
@VisibleForTesting
@RestrictTo(RestrictTo.Scope.LIBRARY)
- @RequiresApi(19)
protected CompatPermissionManager onCreatePermissionManager(
@NonNull String[] autoGrantPermissions) {
return new CompatPermissionManager(getContext(), PERMS_PREFIX + getClass().getName(),
@@ -330,7 +326,6 @@
*/
@NonNull
@RestrictTo(RestrictTo.Scope.LIBRARY)
- @RequiresApi(19)
public Slice createPermissionSlice(@NonNull Uri sliceUri,
@NonNull String callingPackage) {
Context context = getContext();
@@ -364,7 +359,6 @@
/**
* Create a PendingIntent pointing at the permission dialog.
*/
- @RequiresApi(19)
private static PendingIntent createPermissionIntent(Context context, Uri sliceUri,
String callingPackage) {
Intent intent = new Intent();
@@ -383,7 +377,6 @@
/**
* Get string describing permission request.
*/
- @RequiresApi(19)
@SuppressWarnings("deprecation")
private static CharSequence getPermissionString(Context context, String callingPackage) {
PackageManager pm = context.getPackageManager();
@@ -412,7 +405,6 @@
*/
// TODO: Provide alternate notifyChange that takes in the slice (i.e. notifyChange(Uri, Slice)).
@Nullable
- @RequiresApi(19)
public abstract Slice onBindSlice(@NonNull Uri sliceUri);
/**
@@ -433,7 +425,6 @@
* @param sliceUri The uri of the slice being unpinned.
* @see #onSliceUnpinned(Uri)
*/
- @RequiresApi(19)
public void onSlicePinned(@NonNull Uri sliceUri) {}
/**
@@ -444,13 +435,11 @@
* or jobs related to this slice should be cancelled.
* @see #onSlicePinned(Uri)
*/
- @RequiresApi(19)
public void onSliceUnpinned(@NonNull Uri sliceUri) {}
/**
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
- @RequiresApi(19)
public void handleSlicePinned(@NonNull Uri sliceUri) {
List<Uri> pinnedSlices = getPinnedSlices();
if (!pinnedSlices.contains(sliceUri)) {
@@ -461,7 +450,6 @@
/**
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
- @RequiresApi(19)
public void handleSliceUnpinned(@NonNull Uri sliceUri) {
List<Uri> pinnedSlices = getPinnedSlices();
if (pinnedSlices.contains(sliceUri)) {
@@ -478,7 +466,6 @@
* @see android.app.slice.Slice
*/
@NonNull
- @RequiresApi(19)
public Uri onMapIntentToUri(@NonNull Intent intent) {
throw new UnsupportedOperationException(
"This provider has not implemented intent to uri mapping");
@@ -495,7 +482,6 @@
* @see androidx.slice.SliceViewManager#getSliceDescendants(Uri)
*/
@NonNull
- @RequiresApi(19)
public Collection<Uri> onGetSliceDescendants(@NonNull Uri uri) {
return Collections.emptyList();
}
@@ -506,7 +492,6 @@
* @return All pinned slices.
*/
@NonNull
- @RequiresApi(19)
public List<Uri> getPinnedSlices() {
synchronized (mPinnedSliceUrisLock) {
if (mPinnedSliceUris == null) {
@@ -562,7 +547,6 @@
@Nullable
@Override
- @RequiresApi(16)
public final Cursor query(@NonNull Uri uri, @Nullable String[] projection,
@Nullable String selection, @Nullable String[] selectionArgs,
@Nullable String sortOrder, @Nullable CancellationSignal cancellationSignal) {
@@ -594,7 +578,6 @@
@Nullable
@Override
- @RequiresApi(19)
public final Uri canonicalize(@NonNull Uri url) {
return null;
}
@@ -602,7 +585,6 @@
/**
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
- @RequiresApi(19)
public static void setSpecs(@Nullable Set<SliceSpec> specs) {
sSpecs = specs;
}
@@ -611,7 +593,6 @@
*/
@Nullable
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
- @RequiresApi(19)
public static Set<SliceSpec> getCurrentSpecs() {
return sSpecs;
}
@@ -619,7 +600,6 @@
/**
*/
@RestrictTo(RestrictTo.Scope.LIBRARY)
- @RequiresApi(19)
public static void setClock(@Nullable Clock clock) {
sClock = clock;
}
@@ -628,7 +608,6 @@
*/
@Nullable
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @RequiresApi(19)
public static Clock getClock() {
return sClock;
}
diff --git a/slice/slice-core/src/main/java/androidx/slice/compat/SliceProviderCompat.java b/slice/slice-core/src/main/java/androidx/slice/compat/SliceProviderCompat.java
index 24a73f3..9f327fc 100644
--- a/slice/slice-core/src/main/java/androidx/slice/compat/SliceProviderCompat.java
+++ b/slice/slice-core/src/main/java/androidx/slice/compat/SliceProviderCompat.java
@@ -66,7 +66,6 @@
/**
*/
@RestrictTo(Scope.LIBRARY_GROUP)
-@RequiresApi(19)
@Deprecated
public class SliceProviderCompat {
public static final String PERMS_PREFIX = "slice_perms_";
diff --git a/viewpager2/viewpager2/src/main/java/androidx/viewpager2/widget/ViewPager2.java b/viewpager2/viewpager2/src/main/java/androidx/viewpager2/widget/ViewPager2.java
index 3a5f4ab0..822f6b9 100644
--- a/viewpager2/viewpager2/src/main/java/androidx/viewpager2/widget/ViewPager2.java
+++ b/viewpager2/viewpager2/src/main/java/androidx/viewpager2/widget/ViewPager2.java
@@ -957,7 +957,6 @@
mAccessibilityProvider.onInitializeAccessibilityNodeInfo(info);
}
- @RequiresApi(16)
@Override
public boolean performAccessibilityAction(int action, @Nullable Bundle arguments) {
if (mAccessibilityProvider.handlesPerformAccessibilityAction(action, arguments)) {