Skip to content

Commit

Permalink
Fix Espresso Device doc generation warnings
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 592334740
  • Loading branch information
Paige McAuliffe authored and copybara-androidxtest committed Dec 19, 2023
1 parent 43bba1e commit d9655d6
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
1 change: 1 addition & 0 deletions espresso/device/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
**Bug Fixes**

* Add better error messaging when process does not have INTERNET permission
* Make exception class references in Espresso Device documentation clickable links

**New Features**

Expand Down
6 changes: 3 additions & 3 deletions espresso/device/java/androidx/test/espresso/device/BUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Description:
# EspressoDevice - the new Synchronized Device State Change API for Android.

load("//build_extensions:api_checks.bzl", "api_checks")
load("//build_extensions:dackka_test.bzl", "dackka_test")
load("//build_extensions:kt_android_library.bzl", "kt_android_library")
load("//build_extensions/maven:axt_android_aar.bzl", "axt_android_aar")
load("//build_extensions/maven:maven_artifact.bzl", "maven_artifact")
load("//build_extensions:dackka_test.bzl", "dackka_test")
load("//build_extensions:api_checks.bzl", "api_checks")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])
Expand Down Expand Up @@ -35,7 +35,6 @@ kt_android_library(
"//espresso/device/java/androidx/test/espresso/device/sizeclass",
],
deps = [
"//annotation/java/androidx/test/annotation",
"//espresso/device/java/androidx/test/espresso/device/action",
"//espresso/device/java/androidx/test/espresso/device/dagger",
"//espresso/device/java/androidx/test/espresso/device/sizeclass",
Expand All @@ -50,6 +49,7 @@ android_library(
testonly = 1,
custom_package = "androidx.test.espresso.device",
manifest = "AndroidManifest.xml",
visibility = ["//:__subpackages__"],
exports = [
":device",
"//espresso/device/java/androidx/test/espresso/device/action",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ import androidx.test.internal.util.Checks.checkNotMainThread
import androidx.test.platform.device.DeviceController
import javax.inject.Inject

/**
* API surface for performing device-centric operations.
*/
/** API surface for performing device-centric operations. */
class DeviceInteraction @Inject constructor(private val deviceController: DeviceController) {

/**
Expand All @@ -57,8 +55,10 @@ class DeviceInteraction @Inject constructor(private val deviceController: Device
* This action is for foldable devices only. Currently only supported for tests run on Android
* Emulators.
*
* @throws UnsupportedDeviceOperationException if used on a real device.
* @throws DeviceControllerOperationException when called on a non-foldable Emulator.
* @throws androidx.test.platform.device.UnsupportedDeviceOperationException if used on a real
* device.
* @throws androidx.test.espresso.device.controller.DeviceControllerOperationException when
* called on a non-foldable Emulator.
*/
fun DeviceInteraction.setTabletopMode(): DeviceInteraction {
perform(getSetTabletopModeDeviceAction())
Expand All @@ -73,8 +73,10 @@ class DeviceInteraction @Inject constructor(private val deviceController: Device
* This action is for foldable devices only. Currently only supported for tests run on Android
* Emulators.
*
* @throws UnsupportedDeviceOperationException if used on a real device.
* @throws DeviceControllerOperationException when called on a non-foldable Emulator.
* @throws androidx.test.platform.device.UnsupportedDeviceOperationException if used on a real
* device.
* @throws androidx.test.espresso.device.controller.DeviceControllerOperationException when
* called on a non-foldable Emulator.
*/
fun DeviceInteraction.setBookMode(): DeviceInteraction {
perform(getSetBookModeDeviceAction())
Expand All @@ -88,8 +90,10 @@ class DeviceInteraction @Inject constructor(private val deviceController: Device
* This action is for foldable devices only. Currently only supported for tests run on Android
* Emulators.
*
* @throws UnsupportedDeviceOperationException if used on a real device.
* @throws DeviceControllerOperationException when called on a non-foldable Emulator.
* @throws androidx.test.platform.device.UnsupportedDeviceOperationException if used on a real
* device.
* @throws androidx.test.espresso.device.controller.DeviceControllerOperationException when
* called on a non-foldable Emulator.
*/
fun DeviceInteraction.setFlatMode(): DeviceInteraction {
perform(getSetFlatModeDeviceAction())
Expand All @@ -102,8 +106,10 @@ class DeviceInteraction @Inject constructor(private val deviceController: Device
* This action is for foldable devices only. Currently only supported for tests run on Android
* Emulators.
*
* @throws UnsupportedDeviceOperationException if used on a real device.
* @throws DeviceControllerOperationException when called on a non-foldable Emulator.
* @throws androidx.test.platform.device.UnsupportedDeviceOperationException if used on a real
* device.
* @throws androidx.test.espresso.device.controller.DeviceControllerOperationException when
* called on a non-foldable Emulator.
*/
fun DeviceInteraction.setClosedMode(): DeviceInteraction {
perform(getSetClosedModeDeviceAction())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import androidx.test.espresso.device.sizeclass.WidthSizeClass
* This action is for foldable devices only. Currently only supported for tests run on Android
* Emulators.
*
* @throws UnsupportedDeviceOperationException if used on a real device.
* @throws DeviceControllerOperationException when called on a non-foldable Emulator.
* @throws androidx.test.platform.device.UnsupportedDeviceOperationException if used on a real device.
* @throws androidx.test.espresso.device.controller.DeviceControllerOperationException when called on a non-foldable Emulator.
*/
fun setTabletopMode(): DeviceAction {
return TabletopModeAction()
Expand All @@ -48,8 +48,8 @@ fun setTabletopMode(): DeviceAction {
* This action is for foldable devices only. Currently only supported for tests run on Android
* Emulators.
*
* @throws UnsupportedDeviceOperationException if used on a real device.
* @throws DeviceControllerOperationException when called on a non-foldable Emulator.
* @throws androidx.test.platform.device.UnsupportedDeviceOperationException if used on a real device.
* @throws androidx.test.espresso.device.controller.DeviceControllerOperationException when called on a non-foldable Emulator.
*/
fun setBookMode(): DeviceAction {
return BookModeAction()
Expand All @@ -62,8 +62,8 @@ fun setBookMode(): DeviceAction {
* This action is for foldable devices only. Currently only supported for tests run on Android
* Emulators.
*
* @throws UnsupportedDeviceOperationException if used on a real device.
* @throws DeviceControllerOperationException when called on a non-foldable Emulator.
* @throws androidx.test.platform.device.UnsupportedDeviceOperationException if used on a real device.
* @throws androidx.test.espresso.device.controller.DeviceControllerOperationException when called on a non-foldable Emulator.
*/
fun setFlatMode(): DeviceAction {
return FlatModeAction()
Expand All @@ -75,8 +75,8 @@ fun setFlatMode(): DeviceAction {
* This action is for foldable devices only. Currently only supported for tests run on Android
* Emulators.
*
* @throws UnsupportedDeviceOperationException if used on a real device.
* @throws DeviceControllerOperationException when called on a non-foldable Emulator.
* @throws androidx.test.platform.device.UnsupportedDeviceOperationException if used on a real device.
* @throws androidx.test.espresso.device.controller.DeviceControllerOperationException when called on a non-foldable Emulator.
*/
fun setClosedMode(): DeviceAction {
return ClosedModeAction()
Expand Down

0 comments on commit d9655d6

Please sign in to comment.