Skip to content

Commit 601e863

Browse files
committed
fix(session): remove leftover validateAndroidDeviceSelection
1 parent 04aae51 commit 601e863

1 file changed

Lines changed: 0 additions & 28 deletions

File tree

src/tools/session/create-session.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -59,34 +59,6 @@ export function filterEmptyCapabilities(
5959
return filtered;
6060
}
6161

62-
/**
63-
* Validate Android device selection when multiple devices are available
64-
*/
65-
export async function validateAndroidDeviceSelection(
66-
isRemoteServer: boolean,
67-
explicitDeviceCaps?: Record<string, any>
68-
): Promise<void> {
69-
if (isRemoteServer) {
70-
return;
71-
}
72-
73-
if (explicitDeviceCaps?.['appium:udid']) {
74-
return;
75-
}
76-
77-
const adb = await ADBManager.getInstance().initialize();
78-
const devices = await adb.getConnectedDevices();
79-
80-
if (devices.length > 1) {
81-
const selectedDevice = getSelectedLocalDevice()?.udid;
82-
if (!selectedDevice) {
83-
throw new Error(
84-
`Multiple Android devices found (${devices.length}). Use select_device with platform=android to choose one, then call appium_session_management with action=create.`
85-
);
86-
}
87-
}
88-
}
89-
9062
/**
9163
* Build Android capabilities by merging defaults, config, device selection, and custom capabilities
9264
*/

0 commit comments

Comments
 (0)