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
9c1aba2a
Commit
9c1aba2a
authored
May 01, 2017
by
Todd Volkert
Committed by
GitHub
May 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip adb server restarts during device discovery (#9693)
parent
c6b0f833
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+11
-2
No files found.
packages/flutter_tools/lib/src/android/android_device.dart
View file @
9c1aba2a
...
...
@@ -64,12 +64,14 @@ class AndroidDevice extends Device {
// `adb shell getprop` result as UTF8.
final
ProcessResult
result
=
await
processManager
.
run
(
propCommand
,
stdoutEncoding:
LATIN1
stdoutEncoding:
LATIN1
,
stderrEncoding:
LATIN1
,
).
timeout
(
const
Duration
(
seconds:
5
));
if
(
result
.
exitCode
==
0
)
{
_properties
=
parseAdbDeviceProperties
(
result
.
stdout
);
}
else
{
printError
(
'Error retrieving device properties for
$name
.'
);
printError
(
'Error retrieving device properties for
$name
:'
);
printError
(
result
.
stderr
);
}
}
on
TimeoutException
catch
(
_
)
{
throwToolExit
(
'adb not responding'
);
...
...
@@ -515,6 +517,7 @@ List<AndroidDevice> getAdbDevices({ String mockAdbOutput }) {
if
(
mockAdbOutput
==
null
)
{
final
String
adbPath
=
getAdbPath
(
androidSdk
);
printTrace
(
'Listing devices using
$adbPath
'
);
if
(
adbPath
==
null
)
return
<
AndroidDevice
>[];
text
=
runSync
(<
String
>[
adbPath
,
'devices'
,
'-l'
]);
...
...
@@ -533,6 +536,12 @@ List<AndroidDevice> getAdbDevices({ String mockAdbOutput }) {
if
(
line
.
startsWith
(
'* daemon '
))
continue
;
// Skip lines about adb server and client version not matching
if
(
line
.
startsWith
(
'adb server version'
))
{
printStatus
(
line
);
continue
;
}
if
(
line
.
startsWith
(
'List of devices'
))
continue
;
...
...
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