Unverified Commit ba71933f authored by Devon Carew's avatar Devon Carew Committed by GitHub

don't warn for non-matching device discoverers (#25440)

* don't warn for non-matching device discoverers

* remove an out of date test
parent 0a798105
......@@ -579,21 +579,6 @@ class DeviceDomain extends Domain {
if (!discoverer.supportsPlatform)
return;
if (!discoverer.canListAnything) {
// This event will affect the client UI. Coordinate changes here
// with the Flutter IntelliJ team.
sendEvent(
'daemon.showMessage',
<String, String>{
'level': 'warning',
'title': 'Unable to list devices',
'message':
'Unable to discover ${discoverer.name}. Please run '
'"flutter doctor" to diagnose potential issues',
},
);
}
_discoverers.add(discoverer);
discoverer.onAdded.listen(_onDeviceEvent('device.added'));
......
......@@ -179,28 +179,6 @@ void main() {
await commands.close();
});
testUsingContext('daemon should send showMessage on startup if no Android devices are available', () async {
final StreamController<Map<String, dynamic>> commands = StreamController<Map<String, dynamic>>();
final StreamController<Map<String, dynamic>> responses = StreamController<Map<String, dynamic>>();
daemon = Daemon(
commands.stream,
responses.add,
notifyingLogger: notifyingLogger,
);
final Map<String, dynamic> response =
await responses.stream.skipWhile(_isConnectedEvent).first;
expect(response['event'], 'daemon.showMessage');
expect(response['params'], isMap);
expect(response['params'], containsPair('level', 'warning'));
expect(response['params'], containsPair('title', 'Unable to list devices'));
expect(response['params'], containsPair('message', contains('Unable to discover Android devices')));
}, overrides: <Type, Generator>{
AndroidWorkflow: () => MockAndroidWorkflow(canListDevices: false),
IOSWorkflow: () => MockIOSWorkflow(),
FuchsiaWorkflow: () => MockFuchsiaWorkflow(),
});
testUsingContext('device.getDevices should respond with list', () async {
final StreamController<Map<String, dynamic>> commands = StreamController<Map<String, dynamic>>();
final StreamController<Map<String, dynamic>> responses = StreamController<Map<String, dynamic>>();
......
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