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

Unified Diff: tools/telemetry/telemetry/core/platform/android_platform_backend.py

Issue 333933003: [Android] Switch to DeviceUtils version of RunShellCommand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 6 months 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
Index: tools/telemetry/telemetry/core/platform/android_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/android_platform_backend.py b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
index 5115d595ccbe6f20bf070efb0361094f827916c1..5242cb429d28b84bef24e3927d500ea990c5c0f4 100644
--- a/tools/telemetry/telemetry/core/platform/android_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
@@ -184,8 +184,7 @@ class AndroidPlatformBackend(
raise NotImplementedError()
def FlushDnsCache(self):
- self._device.old_interface.RunShellCommandWithSU(
- 'ndc resolver flushdefaultif')
+ self._device.RunShellCommand('ndc resolver flushdefaultif', root=True)
def LaunchApplication(
self, application, parameters=None, elevate_privilege=False):
@@ -197,8 +196,7 @@ class AndroidPlatformBackend(
raise NotImplementedError("elevate_privilege isn't supported on android.")
if not parameters:
parameters = ''
- self._device.old_interface.RunShellCommand(
- 'am start ' + parameters + ' ' + application)
+ self._device.RunShellCommand('am start ' + parameters + ' ' + application)
def IsApplicationRunning(self, application):
if application in _HOST_APPLICATIONS:
@@ -269,8 +267,7 @@ class AndroidPlatformBackend(
command = 'ps'
if pid:
command += ' -p %d' % pid
- ps = self._device.old_interface.RunShellCommand(
- command, log_result=False)[1:]
+ ps = self._device.RunShellCommand(command)[1:]
output = []
for line in ps:
data = line.split()

Powered by Google App Engine
This is Rietveld 408576698