Commit e504dabd authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Minor style tweaks (#9766)

parent ba4bba74
......@@ -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<String> launchArguments = <String>["--enable-dart-profiling"];
final List<String> launchArguments = <String>['--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 <Uri>[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(<Future<Uri>>[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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment