Assigned
Status Update
Comments
ch...@google.com <ch...@google.com> #3
hello?
al...@google.com <al...@google.com> #4
@RequiresApi
is technically WAI in this case, as it's an annotation used for the NewApi
lint rather than filtering tests, but this might be a good case for a lint check to suggest replacing @RequiresApi
with @SdkSuppress
when it's paired with @Test
.
ae...@google.com <ae...@google.com> #5
This bug has not been updated since 2022. If this is still occurring please reopen this bug.
au...@google.com <au...@google.com> #6
The behavior is still true.
Description
The following test is executed on versions earlier than Android N:
@RequiresApi(Build.VERSION_CODES.N)
@Test
fun getFrameData24() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Api24TestClass().frameMetricsTest(...args...)
}
}
but adding @SdkSuppress(Build.VERSION_CODES.N) prevents the test from running.
I expected RequiresApi to be all that I needed, not sure why that doesn't do the trick here.