mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Minor style tweaks (#9766)
This commit is contained in:
parent
ba4bba7498
commit
e504dabdd2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user