Commit 1f0d2920 authored by Devon Carew's avatar Devon Carew

Merge pull request #1735 from devoncarew/filter_offline_devices

filter offline devices from notifications
parents 1616f2a1 36b6210c
......@@ -103,6 +103,9 @@ class Adb {
} else {
List<AdbDevice> devices = devicesText.split('\n').map((String deviceInfo) {
return new AdbDevice(deviceInfo);
}).where((AdbDevice device) {
// Filter unauthorized devices - we can't connect to them.
return !device.isUnauthorized && !device.isOffline;
}).toList();
await _populateDeviceNames(devices);
......@@ -195,6 +198,10 @@ class AdbDevice {
bool get isAvailable => status == 'device';
bool get isUnauthorized => status == 'unauthorized';
bool get isOffline => status == 'offline';
/// Device model; can be null. `XT1045`, `Nexus_7`
String get modelID => _info['model'];
......
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