From a6b9c404f3580a1d058a2ff2817d63e6dd9edc0f Mon Sep 17 00:00:00 2001 From: Dan Field Date: Sun, 23 May 2021 10:02:26 -0700 Subject: [PATCH] Remove dead code from attach.dart (#83187) * Remove dead code from attach.dart Remove dead code (see https://github.com/flutter/flutter/pull/30857/files#diff-70164e71957eed4bf8b4119543e779e808e3ddfedeceef98d4a24ab23efc99ecR214) --- .../flutter_tools/lib/src/commands/attach.dart | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/attach.dart b/packages/flutter_tools/lib/src/commands/attach.dart index b064271f6c..4b995e1423 100644 --- a/packages/flutter_tools/lib/src/commands/attach.dart +++ b/packages/flutter_tools/lib/src/commands/attach.dart @@ -225,19 +225,6 @@ known, it can be explicitly provided to attach via the command-line, e.g. Future _attachToDevice(Device device) async { final FlutterProject flutterProject = FlutterProject.current(); - Future getDevicePort() async { - if (debugPort != null) { - return debugPort; - } - // This call takes a non-trivial amount of time, and only iOS devices and - // simulators support it. - // If/when we do this on Android or other platforms, we can update it here. - if (device is IOSDevice || device is IOSSimulator) { - } - return null; - } - final int devicePort = await getDevicePort(); - final Daemon daemon = boolArg('machine') ? Daemon( stdinCommandStream, @@ -255,7 +242,7 @@ known, it can be explicitly provided to attach via the command-line, e.g. final String ipv4Loopback = InternetAddress.loopbackIPv4.address; final String hostname = usesIpv6 ? ipv6Loopback : ipv4Loopback; - if (devicePort == null && debugUri == null) { + if (debugPort == null && debugUri == null) { if (device is FuchsiaDevice) { final String module = stringArg('module'); if (module == null) { @@ -310,7 +297,7 @@ known, it can be explicitly provided to attach via the command-line, e.g. buildObservatoryUri( device, debugUri?.host ?? hostname, - devicePort ?? debugUri.port, + debugPort ?? debugUri.port, hostVmservicePort, debugUri?.path, )