diff options
author | Peter Wen <wnwen@chromium.org> | 2020-05-13 21:15:37 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-13 21:15:37 +0000 |
commit | 818444f5c610852a11fd3c03e5c01f703dae60b0 (patch) | |
tree | 860c76ca9a933c68e737e35fa0127fa3b8fb324e /src/org | |
parent | 396142f05ddfe58f34ab19297bfa507544d85acd (diff) | |
download | webview_support_interfaces-818444f5c610852a11fd3c03e5c01f703dae60b0.tar.gz |
Android: Add webview boundaries apk for lint
Lint no longer runs per-library so we need an apk to ensure these
interface boundaries remain at minSdkVersion 14.
Switch @TargetApi to @RequiresApi for lint.
Add this apk to android_compile_dbg so that it is verified by the CQ.
Bug: 1017190,1082319
Fixes: 1082319
Change-Id: I94064c781bd39b046fbfe9a1f03eb38292eeb24d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2199579
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#768455}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 41c7be9fc741bd26f8eeb2cea57d1069d26283d4
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java b/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java index 1c5f369..c2dc613 100644 --- a/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java +++ b/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java @@ -3,12 +3,11 @@ // found in the LICENSE file. package org.chromium.support_lib_boundary.util; -import android.annotation.SuppressLint; -import android.annotation.TargetApi; import android.os.Build; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; @@ -22,7 +21,6 @@ import java.util.Collection; */ // Although this is not enforced in chromium, this is a requirement enforced when this file is // mirrored into AndroidX. See http://b/120770118 for details. -@SuppressLint("BanTargetApiAnnotation") public class BoundaryInterfaceReflectionUtil { /** * Check if an object is an instance of {@code className}, resolving {@code className} in @@ -91,7 +89,7 @@ public class BoundaryInterfaceReflectionUtil { * method calls to. * @return an InvocationHandlerWithDelegateGetter wrapping {@code delegate} */ - @TargetApi(Build.VERSION_CODES.KITKAT) + @RequiresApi(Build.VERSION_CODES.KITKAT) @Nullable public static InvocationHandler createInvocationHandlerFor(@Nullable final Object delegate) { if (delegate == null) return null; @@ -111,7 +109,7 @@ public class BoundaryInterfaceReflectionUtil { * @return an array of InvocationHandlerWithDelegateGetter instances, each delegating to * the corresponding member of {@code delegates}. */ - @TargetApi(Build.VERSION_CODES.KITKAT) + @RequiresApi(Build.VERSION_CODES.KITKAT) @Nullable public static InvocationHandler[] createInvocationHandlersForArray( @Nullable final Object[] delegates) { @@ -148,7 +146,7 @@ public class BoundaryInterfaceReflectionUtil { * This allows us to pass InvocationHandlers across the support library boundary and later * unwrap the objects used as delegates within those InvocationHandlers. */ - @TargetApi(Build.VERSION_CODES.KITKAT) + @RequiresApi(Build.VERSION_CODES.KITKAT) private static class InvocationHandlerWithDelegateGetter implements InvocationHandler { private final Object mDelegate; |