Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: mojo/devtools/common/devtoolslib/android_shell.py

Issue 1524103002: Forward the fixed flutter observatory port in `android_shell.py`. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/devtools/common/remote_adb_setup » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/devtoolslib/android_shell.py
diff --git a/mojo/devtools/common/devtoolslib/android_shell.py b/mojo/devtools/common/devtoolslib/android_shell.py
index dfa0c8449daaaae15525b39d5f9527e4da0d2624..ca7d5c17b06f78e5601093c4742ba23185cfa4ee 100644
--- a/mojo/devtools/common/devtoolslib/android_shell.py
+++ b/mojo/devtools/common/devtoolslib/android_shell.py
@@ -34,6 +34,9 @@ _MOJO_SHELL_PACKAGE_NAME = 'org.chromium.mojo.shell'
# Used to parse the output of `adb devices`.
_ADB_DEVICES_HEADER = 'List of devices attached'
+# Fixed port on which Flutter observatory is run.
+_FLUTTER_OBSERVATORY_PORT = 8181
+
_logger = logging.getLogger()
@@ -398,6 +401,11 @@ class AndroidShell(Shell):
logcat_watch_thread.daemon = True
logcat_watch_thread.start()
+ def forward_flutter_observatory_port(self):
+ """Forwards the fixed port on which Flutter observatory is run."""
+ self._forward_host_port_to_device(_FLUTTER_OBSERVATORY_PORT,
+ _FLUTTER_OBSERVATORY_PORT)
+
@overrides(Shell)
def serve_local_directories(self, mappings, port, reuse_servers=False):
assert mappings
@@ -418,6 +426,7 @@ class AndroidShell(Shell):
def run(self, arguments):
self.clean_logs()
self.forward_observatory_ports()
+ self.forward_flutter_observatory_port()
p = self.show_logs()
self.start_shell(arguments, sys.stdout, p.terminate)
« no previous file with comments | « no previous file | mojo/devtools/common/remote_adb_setup » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698