mirror of
https://github.com/flutter/flutter
synced 2024-10-14 04:02:56 +00:00
Wait for stopApp to complete before proceeding with the app install/run flow (#5412)
This commit is contained in:
parent
6e62df42b6
commit
f9876cba4c
|
@ -237,14 +237,10 @@ Future<int> startApp(
|
|||
if (stop) {
|
||||
if (package != null) {
|
||||
printTrace("Stopping app '${package.name}' on ${device.name}.");
|
||||
// We don't wait for the stop command to complete.
|
||||
device.stopApp(package);
|
||||
await device.stopApp(package);
|
||||
}
|
||||
}
|
||||
|
||||
// Allow any stop commands from above to start work.
|
||||
await new Future<Duration>.delayed(Duration.ZERO);
|
||||
|
||||
// TODO(devoncarew): This fails for ios devices - we haven't built yet.
|
||||
if (install && device is AndroidDevice) {
|
||||
printStatus('Installing $package to $device...');
|
||||
|
|
|
@ -137,13 +137,9 @@ class RunAndStayResident extends ResidentRunner {
|
|||
// TODO(devoncarew): Move this into the device.startApp() impls.
|
||||
if (_package != null) {
|
||||
printTrace("Stopping app '${_package.name}' on ${device.name}.");
|
||||
// We don't wait for the stop command to complete.
|
||||
device.stopApp(_package);
|
||||
await device.stopApp(_package);
|
||||
}
|
||||
|
||||
// Allow any stop commands from above to start work.
|
||||
await new Future<Duration>.delayed(Duration.ZERO);
|
||||
|
||||
// TODO(devoncarew): This fails for ios devices - we haven't built yet.
|
||||
if (device is AndroidDevice) {
|
||||
printTrace('Running install command.');
|
||||
|
|
Loading…
Reference in a new issue