From e504dabdd2edbbd7502017377615c3326d6fb45d Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Thu, 4 May 2017 10:28:17 -0700 Subject: [PATCH] Minor style tweaks (#9766) --- .../flutter_tools/lib/src/ios/devices.dart | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 2b769f173af..9cb85566b14 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -49,10 +49,11 @@ class IOSDevice extends Device { _loggerPath = _checkForCommand('idevicesyslog'); _screenshotPath = _checkForCommand('idevicescreenshot'); _pusherPath = _checkForCommand( - 'ios-deploy', - 'To copy files to iOS devices, please install ios-deploy. To install, run:\n' - 'brew update\n' - 'brew install ios-deploy'); + 'ios-deploy', + 'To copy files to iOS devices, please install ios-deploy. To install, run:\n' + 'brew update\n' + 'brew install ios-deploy' + ); } String _installerPath; @@ -162,7 +163,7 @@ class IOSDevice extends Device { final IOSApp iosApp = app; final Directory bundle = fs.directory(iosApp.deviceBundlePath); if (!bundle.existsSync()) { - printError("Could not find application bundle at ${bundle.path}; have you run 'flutter build ios'?"); + printError('Could not find application bundle at ${bundle.path}; have you run "flutter build ios"?'); return false; } @@ -225,16 +226,16 @@ class IOSDevice extends Device { } // Step 3: Attempt to install the application on the device. - final List launchArguments = ["--enable-dart-profiling"]; + final List launchArguments = ['--enable-dart-profiling']; if (debuggingOptions.startPaused) - launchArguments.add("--start-paused"); + launchArguments.add('--start-paused'); if (debuggingOptions.useTestFonts) - launchArguments.add("--use-test-fonts"); + launchArguments.add('--use-test-fonts'); if (debuggingOptions.debuggingEnabled) { - launchArguments.add("--enable-checked-mode"); + launchArguments.add('--enable-checked-mode'); // Note: We do NOT need to set the observatory port since this is going to // be setup on the device. Let it pick a port automatically. We will check @@ -266,12 +267,12 @@ class IOSDevice extends Device { if (!debuggingOptions.debuggingEnabled) { // If debugging is not enabled, just launch the application and continue. - printTrace("Debugging is not enabled"); + printTrace('Debugging is not enabled'); installationResult = await runCommandAndStreamOutput(launchCommand, trace: true); } else { // Debugging is enabled, look for the observatory and diagnostic server // ports post launch. - printTrace("Debugging is enabled, connecting to observatory and the diagnostic server"); + printTrace('Debugging is enabled, connecting to observatory and the diagnostic server'); // TODO(danrubel): The Android device class does something similar to this code below. // The various Device subclasses should be refactored and common code moved into the superclass. @@ -294,11 +295,11 @@ class IOSDevice extends Device { installationResult = result; if (result != 0) { - printTrace("Failed to launch the application on device."); + printTrace('Failed to launch the application on device.'); return [null, null]; } - printTrace("Application launched on the device. Attempting to forward ports."); + printTrace('Application launched on the device. Attempting to forward ports.'); return await Future.wait(>[forwardObsUri, forwardDiagUri]); }).whenComplete(() { observatoryDiscovery.cancel(); @@ -459,7 +460,7 @@ class _IOSDevicePortForwarder extends DevicePortForwarder { final ForwardedPort forwardedPort = new ForwardedPort.withContext(hostPort, devicePort, process); - printTrace("Forwarded port $forwardedPort"); + printTrace('Forwarded port $forwardedPort'); _forwardedPorts.add(forwardedPort); @@ -473,14 +474,14 @@ class _IOSDevicePortForwarder extends DevicePortForwarder { return null; } - printTrace("Unforwarding port $forwardedPort"); + printTrace('Unforwarding port $forwardedPort'); final Process process = forwardedPort.context; if (process != null) { processManager.killPid(process.pid); } else { - printError("Forwarded port did not have a valid process"); + printError('Forwarded port did not have a valid process'); } return null;