Fixed
Status Update
Comments
tn...@google.com <tn...@google.com>
tn...@google.com <tn...@google.com> #2
Information redacted by Android Beta Feedback.
an...@google.com <an...@google.com> #3
Thanks for reporting this issue. We have passed this to the development team and will update this issue with more information as it becomes available.
Description
To repro:
Build.VERSION.SDK_INT
is above a particular value.@RequiresApi
to capture this requirement.Expected:
Lint warns me if I call this method without checking
Build.VERSION.SDK_INT
(like how the@RequiresApi
annotation works in non-test code).Actual:
Lint tells me to use
@SdkSuppress
instead (see screenshot). This doesn't seem equivalent to me, since@SdkSuppress
should only be used on public@Test
methods to allow the test runner to decide whether to run them or not. This is a private method, which won't be directly invoked by the test runner.