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
27936e9f
Unverified
Commit
27936e9f
authored
Oct 15, 2020
by
Jonah Williams
Committed by
GitHub
Oct 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[flutter_tools] ensure android log reader works in flutter drive (#68131)" (#68222)
This reverts commit
d962c8f2
.
parent
2321b72d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
29 deletions
+7
-29
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+0
-9
drive.dart
packages/flutter_tools/lib/src/commands/drive.dart
+7
-6
android_device_test.dart
...tools/test/general.shard/android/android_device_test.dart
+0
-14
No files found.
packages/flutter_tools/lib/src/android/android_device.dart
View file @
27936e9f
...
...
@@ -683,7 +683,6 @@ class AndroidDevice extends Device {
return
LaunchResult
.
failed
();
}
}
resetLogReaders
();
return
LaunchResult
.
succeeded
(
observatoryUri:
observatoryUri
);
}
on
Exception
catch
(
error
)
{
_logger
.
printError
(
'Error waiting for a debug connection:
$error
'
);
...
...
@@ -743,14 +742,6 @@ class AndroidDevice extends Device {
_processUtils
.
runSync
(
adbCommandForDevice
(<
String
>[
'logcat'
,
'-c'
]));
}
/// Android device log readers are singletons. if they are closed by the
/// protocol discovery, the same kind of reader cannot be recreated.
@visibleForTesting
void
resetLogReaders
()
{
_pastLogReader
=
null
;
_logReader
=
null
;
}
@override
FutureOr
<
DeviceLogReader
>
getLogReader
({
AndroidApk
app
,
...
...
packages/flutter_tools/lib/src/commands/drive.dart
View file @
27936e9f
...
...
@@ -490,6 +490,12 @@ Future<LaunchResult> _startApp(
globals
.
printTrace
(
'Starting application.'
);
// Forward device log messages to the terminal window running the "drive" command.
final
DeviceLogReader
logReader
=
await
command
.
device
.
getLogReader
(
app:
package
);
command
.
_deviceLogSubscription
=
logReader
.
logLines
.
listen
(
globals
.
printStatus
);
final
LaunchResult
result
=
await
command
.
device
.
startApp
(
package
,
mainPath:
mainPath
,
...
...
@@ -511,15 +517,10 @@ Future<LaunchResult> _startApp(
);
if
(!
result
.
started
)
{
await
command
.
_deviceLogSubscription
.
cancel
();
return
null
;
}
// Forward device log messages to the terminal window running the "drive" command.
final
DeviceLogReader
logReader
=
await
command
.
device
.
getLogReader
(
app:
package
);
command
.
_deviceLogSubscription
=
logReader
.
logLines
.
listen
(
globals
.
printStatus
);
return
result
;
}
...
...
packages/flutter_tools/test/general.shard/android/android_device_test.dart
View file @
27936e9f
...
...
@@ -30,20 +30,6 @@ void main() {
expect
(
device
.
id
,
'1234'
);
});
testWithoutContext
(
'Can reset log reader singletons'
,
()
async
{
final
AndroidDevice
device
=
setUpAndroidDevice
();
final
DeviceLogReader
logReader
=
await
device
.
getLogReader
();
final
DeviceLogReader
logReader2
=
await
device
.
getLogReader
();
expect
(
logReader
,
logReader2
);
device
.
resetLogReaders
();
final
DeviceLogReader
logReader3
=
await
device
.
getLogReader
();
expect
(
logReader
,
isNot
(
logReader3
));
});
testWithoutContext
(
'parseAdbDeviceProperties parses adb shell output'
,
()
{
final
Map
<
String
,
String
>
properties
=
parseAdbDeviceProperties
(
kAdbShellGetprop
);
...
...
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