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

Unified Diff: build/android/pylib/perf/thermal_throttle.py

Issue 358993003: [Android] Switch to DeviceUtils versions of file functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « build/android/pylib/perf/perf_control_unittest.py ('k') | build/android/pylib/screenshot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf/thermal_throttle.py
diff --git a/build/android/pylib/perf/thermal_throttle.py b/build/android/pylib/perf/thermal_throttle.py
index 87ae9665a9d8a43522c430baa02f4c08f19a1c38..a125e72fbd78a2fb1f77397bf57a0ff9db86f6c5 100644
--- a/build/android/pylib/perf/thermal_throttle.py
+++ b/build/android/pylib/perf/thermal_throttle.py
@@ -14,8 +14,7 @@ class OmapThrottlingDetector(object):
@staticmethod
def IsSupported(device):
- return device.old_interface.FileExistsOnDevice(
- OmapThrottlingDetector.OMAP_TEMP_FILE)
+ return device.FileExists(OmapThrottlingDetector.OMAP_TEMP_FILE)
def __init__(self, device):
self._device = device
@@ -34,8 +33,7 @@ class OmapThrottlingDetector(object):
return float([s for s in log_line.split() if s.isdigit()][0]) / 1000.0
def GetCurrentTemperature(self):
- tempdata = self._device.old_interface.GetFileContents(
- OmapThrottlingDetector.OMAP_TEMP_FILE)
+ tempdata = self._device.ReadFile(OmapThrottlingDetector.OMAP_TEMP_FILE)
return float(tempdata[0]) / 1000.0
@@ -43,7 +41,7 @@ class ExynosThrottlingDetector(object):
"""Class to detect and track thermal throttling on an Exynos 5."""
@staticmethod
def IsSupported(device):
- return device.old_interface.FileExistsOnDevice('/sys/bus/exynos5-core')
+ return device.FileExists('/sys/bus/exynos5-core')
def __init__(self, device):
pass
« no previous file with comments | « build/android/pylib/perf/perf_control_unittest.py ('k') | build/android/pylib/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698