Skip to content

Commit 045dda0

Browse files
Paige McAuliffecopybara-androidxtest
authored andcommitted
Update setup guide URL for Espresso Device setup
PiperOrigin-RevId: 670696336
1 parent 453f494 commit 045dda0

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

espresso/device/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
* Add support for setting screen orientation with multiple resumed activities
1010
* Fix concurrent modification issue when setting screen orientation and fold modes
11+
* Adjust reference docs to state set up guide is now located at https://developer.android.com/studio/test/espresso-api#set_up_your_project_for_the_espresso_device_api
1112

1213
**New Features**
1314

espresso/device/java/androidx/test/espresso/device/controller/emulator/EmulatorController.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ constructor(
5252
private val TAG = EmulatorController::class.java.simpleName
5353
private const val DEGREES_TO_ROTATE_LANDSCAPE_TO_PORTRAIT = -90F
5454
private const val DEGREES_TO_ROTATE_PORTRAIT_TO_LANDSCAPE = 90F
55+
private const val additionalSetUpInstructions =
56+
" See https://developer.android.com/studio/test/espresso-api#set_up_your_project_for_the_espresso_device_api for set up instructions."
5557
}
5658

5759
override fun setDeviceMode(deviceMode: Int) {
@@ -82,8 +84,8 @@ constructor(
8284
throw DeviceControllerOperationException(
8385
"Failed to set device mode. Please make sure the connected Emulator is foldable, the Android Emulator version" +
8486
" is updated to 33.1.11+, and the controller gRPC service is enabled on the emulator" +
85-
" See https://developer.android.com/studio/preview/features#set_up_your_project_for_the_espresso_device_api for set up instructions.",
86-
e
87+
additionalSetUpInstructions,
88+
e,
8789
)
8890
}
8991
}
@@ -131,8 +133,8 @@ constructor(
131133
throw DeviceControllerOperationException(
132134
"Failed to set screen orientation. Please make sure the Android Emulator version" +
133135
" is updated to 33.1.11+ and the controller gRPC service is enabled on the emulator." +
134-
" See https://developer.android.com/studio/preview/features#set_up_your_project_for_the_espresso_device_api for set up instructions.",
135-
e
136+
additionalSetUpInstructions,
137+
e,
136138
)
137139
}
138140
}
@@ -150,8 +152,8 @@ constructor(
150152
) {
151153
throw DeviceControllerOperationException(
152154
"The current process does not have the INTERNET permission. Ensure the app-under-test has '<uses-permission " +
153-
"android:name=\"android.permission.INTERNET\"/>' in its AndroidManifest.xml. See " +
154-
"See https://developer.android.com/studio/preview/features#set_up_your_project_for_the_espresso_device_api for set up instructions."
155+
"android:name=\"android.permission.INTERNET\"/>' in its AndroidManifest.xml." +
156+
additionalSetUpInstructions
155157
)
156158
}
157159
}

espresso/device/java/androidx/test/espresso/device/dagger/DeviceControllerModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ internal class DeviceControllerModule {
106106
throw DeviceControllerOperationException(
107107
"Unable to connect to Emulator gRPC port. Please make sure the Android Emulator version" +
108108
" is updated to 33.1.11+ and the controller gRPC service is enabled on the emulator." +
109-
" See https://developer.android.com/studio/preview/features#set_up_your_project_for_the_espresso_device_api for set up instructions."
109+
" See https://developer.android.com/studio/test/espresso-api#set_up_your_project_for_the_espresso_device_api for set up instructions."
110110
)
111111
}
112112
return gRpcPort.toInt()

0 commit comments

Comments
 (0)