Remove listDevices
Summary: Appears to be unused. Reviewed By: mweststrate Differential Revision: D26753922 fbshipit-source-id: 7a21b8242e4c8d2428a286bc6ef63adafe74a78c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
847f4d0151
commit
43242557aa
@@ -275,20 +275,6 @@ async function isXcodeDetected(): Promise<boolean> {
|
||||
.catch((_) => false);
|
||||
}
|
||||
|
||||
export async function getActiveDevicesAndSimulators(
|
||||
store: Store,
|
||||
): Promise<Array<IOSDevice>> {
|
||||
const activeDevices: Array<Array<IOSDeviceParams>> = await Promise.all([
|
||||
getSimulators(store, true),
|
||||
getActiveDevices(store.getState().settingsState.idbPath),
|
||||
]);
|
||||
const allDevices = activeDevices[0].concat(activeDevices[1]);
|
||||
return allDevices.map((device) => {
|
||||
const {udid, type, name} = device;
|
||||
return new IOSDevice(udid, type, name);
|
||||
});
|
||||
}
|
||||
|
||||
export default (store: Store, logger: Logger) => {
|
||||
if (!store.getState().settingsState.enableIOS) {
|
||||
return;
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {getActiveAndroidDevices} from '../dispatcher/androidDevice';
|
||||
import {getActiveDevicesAndSimulators} from '../dispatcher/iOSDevice';
|
||||
import BaseDevice from '../devices/BaseDevice';
|
||||
import {Store} from '../reducers/index';
|
||||
|
||||
export async function listDevices(store: Store): Promise<Array<BaseDevice>> {
|
||||
const state = store.getState();
|
||||
const androidDevices = state.settingsState.enableAndroid
|
||||
? await getActiveAndroidDevices(store)
|
||||
: [];
|
||||
const iOSDevices: BaseDevice[] = state.settingsState.enableIOS
|
||||
? await getActiveDevicesAndSimulators(store)
|
||||
: [];
|
||||
return [...androidDevices, ...iOSDevices];
|
||||
}
|
||||
Reference in New Issue
Block a user