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

Unified Diff: telemetry/telemetry/internal/platform/android_platform_backend.py

Issue 2467803005: [telemetry] Always use a dynamic device port on android. (RELAND) (Closed)
Patch Set: nednguyen comment Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/platform/android_platform_backend.py
diff --git a/telemetry/telemetry/internal/platform/android_platform_backend.py b/telemetry/telemetry/internal/platform/android_platform_backend.py
index 88598db9fc2415e26e466396a37853c5d42ff9f8..e5a73570bd0a6a0a217cadd973b4c3c8ad33f063 100644
--- a/telemetry/telemetry/internal/platform/android_platform_backend.py
+++ b/telemetry/telemetry/internal/platform/android_platform_backend.py
@@ -44,6 +44,12 @@ from devil.android.sdk import version_codes
from devil.android.tools import video_recorder
try:
+ # devil.android.forwarder uses fcntl, which doesn't exist on Windows.
+ from devil.android import forwarder
+except ImportError:
+ forwarder = None
+
+try:
from devil.android.perf import surface_stats_collector
except Exception:
surface_stats_collector = None
@@ -158,6 +164,9 @@ class AndroidPlatformBackend(
else:
return False
+ def GetRemotePort(self, port):
+ return forwarder.Forwarder.DevicePortForHostPort(port) or 0
+
def IsDisplayTracingSupported(self):
return bool(self.GetOSVersionName() >= 'J')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698