Skip to content

Commit 3ea7f0e

Browse files
brettchabotcopybara-androidxtest
authored andcommitted
Clarify javadoc on RequiresDevice.
Attempt to clarify its current limitations and reasons for deprecation. PiperOrigin-RevId: 587706240
1 parent e4b6a13 commit 3ea7f0e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

runner/android_junit_runner/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
`androidx.test:runner:{version}` is released.
66

77
**Bug Fixes**
8+
* Attempt to clarify limitations and deprecation reasons in RequiresDevice documentation
89

910
**New Features**
1011

runner/android_junit_runner/java/androidx/test/filters/RequiresDevice.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
/**
2424
* Indicates that a specific test should not be run on emulator.
2525
*
26-
* <p>It will be executed only if the test is running on the physical android device.
26+
* <p>The test will be skipped if its executed on one of the recognized Android emulator types
27+
* (currently ones with Build.HARDWARE equal to 'goldfish', 'ranchu' and 'gce_x86')
2728
*
28-
* @deprecated modern emulators have high fidelity, and this annotation should provide limited
29-
* benefit. Use a more specific filtering mechanism to tie tests to a specific environment if
30-
* needed
29+
* @deprecated This annotation should provide limited benefit. Use a more specific filtering
30+
* mechanism to tie tests to a specific environment if needed.
3131
*/
3232
@Retention(RetentionPolicy.RUNTIME)
3333
@Target({ElementType.TYPE, ElementType.METHOD})

0 commit comments

Comments
 (0)