New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 828184 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 781754



Sign in to add a comment

Verify boundary interface code works down to API 14

Project Member Reported by ntfschr@chromium.org, Apr 2 2018

Issue description

Since our support lib module is intended to compile for minSdk 14, we should also verify that the boundary interface code also works correctly on 14.

For example, is it actually OK to catch ReflectiveOperationException [1] on devices below KITKAT (before ReflectiveOperationException was introduced).

Also, we should double-check the minSdk for this folder and make sure it matches the minSdk for the webkit support lib module. If possible, we should explicitly state the minSdk for both (so that we can enforce they stay in-sync with each other).

[1] https://cs.chromium.org/chromium/src/android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java?l=68&rcl=00216db2e577de165217b710b280754b2deb26a1
 
We discussed in our meeting that boundary interfaces should only be called on API level 21+. However, we still need to verify that they work with a minSdk of 14, since the support lib uses that.

Let's use this bug to track explicitly specifying minSdk for this folder instead of relying on clank's default.
Is there a way to specify the minSdk without an AndroidManifest?
Not that I'm aware of, unfortunately
Cc: ntfschr@chromium.org
So would we have to add an AndroidManifest to that folder or what do you suggest we do? :)
I think AndroidManifest.xml is the easiest way.
Cc: gsennton@chromium.org
Labels: -Pri-1 -M-67 M-68 Pri-2
Owner: ntfschr@chromium.org
Not time critical, but important to add for code health. Also, I'll steal this because I've done similar work before.
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b701ea27efea3cd3481721806dd06f41e0759d17

commit b701ea27efea3cd3481721806dd06f41e0759d17
Author: Nate Fischer <ntfschr@chromium.org>
Date: Tue Jun 19 19:29:14 2018

AW: lint: specify minSdkVersion for boundary interfaces

No change to logic.

This creates an AndroidManifest.xml file with only a minSdkVersion,
which we use to configure lint to correctly verify the boundary
interfaces compile down to the support library's minSdkVersion.

This code will continue to only be called on >= 21 (Lollipop).

R=torne@chromium.org

Bug:  828184 
Test: code compiles and passes lint
Test: code doesn't compile with @TargetApi annotations in BoundaryInterfaceReflectionUtil
Change-Id: I270f0f5732c1134ba77b912ece31cf188ee6cb5f
Reviewed-on: https://chromium-review.googlesource.com/1105697
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568566}
[add] https://crrev.com/b701ea27efea3cd3481721806dd06f41e0759d17/android_webview/support_library/boundary_interfaces/AndroidManifest.xml
[modify] https://crrev.com/b701ea27efea3cd3481721806dd06f41e0759d17/android_webview/support_library/boundary_interfaces/BUILD.gn

Status: Verified (was: Assigned)
Mark as verified, because this bug itself is about verifying & enforcing something which already worked.

Sign in to add a comment