Skip to content

Commit cf8fbc3

Browse files
authored
[flutter tools] Revert desktop device name changes and print the category instead (flutter#60395)
1 parent ca71355 commit cf8fbc3

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

packages/flutter_tools/lib/src/device.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ abstract class Device {
559559
supportIndicator += ' ($type)';
560560
}
561561
table.add(<String>[
562-
device.name,
562+
'${device.name} (${device.category})',
563563
device.id,
564564
getNameForTargetPlatform(targetPlatform),
565565
'${await device.sdkNameAndVersion}$supportIndicator',

packages/flutter_tools/lib/src/linux/linux_device.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class LinuxDevice extends DesktopDevice {
2626
bool isSupported() => true;
2727

2828
@override
29-
String get name => 'Linux desktop';
29+
String get name => 'Linux';
3030

3131
@override
3232
Future<TargetPlatform> get targetPlatform async => TargetPlatform.linux_x64;

packages/flutter_tools/lib/src/macos/macos_device.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MacOSDevice extends DesktopDevice {
2424
bool isSupported() => true;
2525

2626
@override
27-
String get name => 'macOS desktop';
27+
String get name => 'macOS';
2828

2929
@override
3030
Future<TargetPlatform> get targetPlatform async => TargetPlatform.darwin_x64;

packages/flutter_tools/lib/src/windows/windows_device.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class WindowsDevice extends DesktopDevice {
2727
bool isSupported() => true;
2828

2929
@override
30-
String get name => 'Windows desktop';
30+
String get name => 'Windows';
3131

3232
@override
3333
Future<TargetPlatform> get targetPlatform async => TargetPlatform.windows_x64;

packages/flutter_tools/test/commands.shard/hermetic/devices_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ void main() {
120120
'''
121121
2 connected devices:
122122
123-
ephemeral • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
124-
webby • webby • web-javascript • Web SDK (1.2.4) (emulator)
123+
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
124+
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
125125
126126
• Cannot connect to device ABC
127127
'''

packages/flutter_tools/test/general.shard/linux/linux_device_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void main() {
2828
testWithoutContext('LinuxDevice defaults', () async {
2929
final PrebuiltLinuxApp linuxApp = PrebuiltLinuxApp(executable: 'foo');
3030
expect(await device.targetPlatform, TargetPlatform.linux_x64);
31-
expect(device.name, 'Linux desktop');
31+
expect(device.name, 'Linux');
3232
expect(await device.installApp(linuxApp), true);
3333
expect(await device.uninstallApp(linuxApp), true);
3434
expect(await device.isLatestBuildInstalled(linuxApp), true);

packages/flutter_tools/test/general.shard/macos/macos_device_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void main() {
4040
testUsingContext('defaults', () async {
4141
final MockMacOSApp mockMacOSApp = MockMacOSApp();
4242
expect(await device.targetPlatform, TargetPlatform.darwin_x64);
43-
expect(device.name, 'macOS desktop');
43+
expect(device.name, 'macOS');
4444
expect(await device.installApp(mockMacOSApp), true);
4545
expect(await device.uninstallApp(mockMacOSApp), true);
4646
expect(await device.isLatestBuildInstalled(mockMacOSApp), true);

packages/flutter_tools/test/general.shard/windows/windows_device_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void main() {
3232
testUsingContext('defaults', () async {
3333
final PrebuiltWindowsApp windowsApp = PrebuiltWindowsApp(executable: 'foo');
3434
expect(await device.targetPlatform, TargetPlatform.windows_x64);
35-
expect(device.name, 'Windows desktop');
35+
expect(device.name, 'Windows');
3636
expect(await device.installApp(windowsApp), true);
3737
expect(await device.uninstallApp(windowsApp), true);
3838
expect(await device.isLatestBuildInstalled(windowsApp), true);

0 commit comments

Comments
 (0)