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

Unified Diff: tools/telemetry/telemetry/core/forwarders/android_forwarder.py

Issue 371813005: [Android] Switch to DeviceUtils versions of Ls, SetJavaAsserts, GetProp, and SetProp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/forwarders/android_forwarder.py
diff --git a/tools/telemetry/telemetry/core/forwarders/android_forwarder.py b/tools/telemetry/telemetry/core/forwarders/android_forwarder.py
index 957ac0e9b93f69de644ea94c136ca0edf9d6096c..2cbcb28f08ad59a16a5a53d33e08f4aa191c4193 100644
--- a/tools/telemetry/telemetry/core/forwarders/android_forwarder.py
+++ b/tools/telemetry/telemetry/core/forwarders/android_forwarder.py
@@ -119,11 +119,11 @@ class AndroidRndisForwarder(forwarders.Forwarder):
return # If there is no route, then nobody cares about DNS.
# DNS proxy in older versions of Android is configured via properties.
# TODO(szym): run via su -c if necessary.
- self._adb.system_properties['net.dns1'] = dns1
- self._adb.system_properties['net.dns2'] = dns2
- dnschange = self._adb.system_properties['net.dnschange']
+ self._adb.device().SetProp('net.dns1', dns1)
+ self._adb.device().SetProp('net.dns2', dns2)
+ dnschange = self._adb.device.GetProp('net.dnschange')
if dnschange:
- self._adb.system_properties['net.dnschange'] = int(dnschange) + 1
+ self._adb.device().SetProp('net.dnschange', int(dnschange) + 1)
# Since commit 8b47b3601f82f299bb8c135af0639b72b67230e6 to frameworks/base
# the net.dns1 properties have been replaced with explicit commands for netd
self._adb.RunShellCommand('ndc netd resolver setifdns %s %s %s' %
@@ -138,8 +138,8 @@ class AndroidRndisForwarder(forwarders.Forwarder):
default_routes = [route[0] for route in routes if route[1] == '00000000']
return (
default_routes[0] if default_routes else None,
- self._adb.system_properties['net.dns1'],
- self._adb.system_properties['net.dns2'],
+ self._adb.GetProp('net.dns1'),
+ self._adb.GetProp('net.dns2'),
)
@@ -215,7 +215,7 @@ class AndroidRndisConfigurator(object):
['sudo', 'bash', '-c', 'echo -e "%s" > %s' % (contents, path)])
def _DisableRndis(self):
- self._device.old_interface.system_properties['sys.usb.config'] = 'adb'
+ self._device.SetProp('sys.usb.config', 'adb')
self._WaitForDevice()
def _EnableRndis(self):

Powered by Google App Engine
This is Rietveld 408576698