From 1bc54e065707e6c91df470bce42deda2ab95cc45 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 15 Jun 2017 11:32:39 -0700 Subject: [PATCH] Eliminate dead iOS device mock code (#10732) This code is unused in any test. In upcoming changes that migrate to Xcode instruments based device listing, we'll mock out the instruments output separately. --- packages/flutter_tools/lib/src/ios/devices.dart | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index a1cb175e7d..396266fb23 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -96,20 +96,20 @@ class IOSDevice extends Device { @override bool get supportsStartPaused => false; - static List getAttachedDevices([IOSDevice mockIOS]) { + static List getAttachedDevices() { if (!doctor.iosWorkflow.hasIDeviceId) return []; final List devices = []; - for (String id in _getAttachedDeviceIDs(mockIOS)) { - final String name = IOSDevice._getDeviceInfo(id, 'DeviceName', mockIOS); + for (String id in _getAttachedDeviceIDs()) { + final String name = IOSDevice._getDeviceInfo(id, 'DeviceName'); devices.add(new IOSDevice(id, name: name)); } return devices; } - static Iterable _getAttachedDeviceIDs([IOSDevice mockIOS]) { - final String listerPath = (mockIOS != null) ? mockIOS.listerPath : _checkForCommand('idevice_id'); + static Iterable _getAttachedDeviceIDs() { + final String listerPath = _checkForCommand('idevice_id'); try { final String output = runSync([listerPath, '-l']); return output.trim().split('\n').where((String s) => s != null && s.isNotEmpty); @@ -118,10 +118,8 @@ class IOSDevice extends Device { } } - static String _getDeviceInfo(String deviceID, String infoKey, [IOSDevice mockIOS]) { - final String informerPath = (mockIOS != null) - ? mockIOS.informerPath - : _checkForCommand('ideviceinfo'); + static String _getDeviceInfo(String deviceID, String infoKey) { + final String informerPath = _checkForCommand('ideviceinfo'); return runSync([informerPath, '-k', infoKey, '-u', deviceID]).trim(); }