Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
2f973fae
Commit
2f973fae
authored
Dec 10, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #871 from abarth/recognize_offline
Recognize offline status in adb
parents
335f5835
fd68f08b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
device.dart
packages/flutter_tools/lib/src/device.dart
+5
-1
No files found.
packages/flutter_tools/lib/src/device.dart
View file @
2f973fae
...
...
@@ -521,8 +521,8 @@ class AndroidDevice extends Device {
// 0149947A0D01500C device usb:340787200X
RegExp
deviceRegex2
=
new
RegExp
(
r'^(\S+)\s+device\s+\S+$'
);
RegExp
unauthorizedRegex
=
new
RegExp
(
r'^(\S+)\s+unauthorized\s+\S+$'
);
RegExp
offlineRegex
=
new
RegExp
(
r'^(\S+)\s+offline\s+\S+$'
);
// Skip first line, which is always 'List of devices attached'.
for
(
String
line
in
output
.
skip
(
1
))
{
...
...
@@ -556,6 +556,10 @@ class AndroidDevice extends Device {
'Device
$deviceID
is not authorized.
\n
'
'You might need to check your device for an authorization dialog.'
);
}
else
if
(
offlineRegex
.
hasMatch
(
line
))
{
Match
match
=
offlineRegex
.
firstMatch
(
line
);
String
deviceID
=
match
[
1
];
logging
.
warning
(
'Device
$deviceID
is offline.'
);
}
else
{
logging
.
warning
(
'Unexpected failure parsing device information from adb output:
\n
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment