Skip to content

Commit 0264e8e

Browse files
committed
Revert "Select desktop or web if no other device is available (#6100)"
This reverts commit 756ed68.
1 parent b0bd7db commit 0264e8e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

flutter-idea/src/io/flutter/run/daemon/DeviceSelection.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,9 @@ DeviceSelection withDevices(@NotNull List<FlutterDevice> newDevices) {
4646
final Optional<FlutterDevice> selectedDevice = findById(newDevices, selectedId);
4747

4848
// If there's no selected device, default the first ephemoral one in the list.
49-
FlutterDevice firstEphemeral =
49+
final FlutterDevice firstEphemoral =
5050
newDevices.stream().filter(FlutterDevice::ephemeral).findFirst().orElse(null);
51-
if (firstEphemeral == null && !newDevices.isEmpty()) {
52-
firstEphemeral = newDevices.get(0);
53-
}
54-
return new DeviceSelection(ImmutableList.copyOf(newDevices), selectedDevice.orElse(firstEphemeral));
51+
return new DeviceSelection(ImmutableList.copyOf(newDevices), selectedDevice.orElse(firstEphemoral));
5552
}
5653

5754
/**

0 commit comments

Comments
 (0)