summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorYasuhiro Matsuda <mazda@google.com>2015-09-16 02:49:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-16 02:49:31 +0000
commitf656b683a6a09dd2ed2934de2e1d5c2044c1fbe2 (patch)
treebc2062d41e5ecb0f7e36472eb8c921f4380dda48 /init
parentc8a5b0b6535aed78e4f213ab4bf4262a6d475263 (diff)
parentada7fa063e4d8e2b8014a138bdf58d7729ce0ee9 (diff)
downloadcore-f656b683a6a09dd2ed2934de2e1d5c2044c1fbe2.tar.gz
core-f656b683a6a09dd2ed2934de2e1d5c2044c1fbe2.tar.bz2
core-f656b683a6a09dd2ed2934de2e1d5c2044c1fbe2.zip
am ada7fa06: Merge "Fix perfboot.py to work with the recent change."
* commit 'ada7fa063e4d8e2b8014a138bdf58d7729ce0ee9': Fix perfboot.py to work with the recent change.
Diffstat (limited to 'init')
-rwxr-xr-xinit/perfboot.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/init/perfboot.py b/init/perfboot.py
index 2a17ab6f2..91e6c2bcb 100755
--- a/init/perfboot.py
+++ b/init/perfboot.py
@@ -92,7 +92,7 @@ class IntervalAdjuster(object):
self._interval = interval
self._device = device
self._temp_paths = device.shell(
- ['ls', '/sys/class/thermal/thermal_zone*/temp']).splitlines()
+ ['ls', '/sys/class/thermal/thermal_zone*/temp'])[0].splitlines()
self._product = device.get_prop('ro.build.product')
self._waited = False
@@ -109,7 +109,7 @@ class IntervalAdjuster(object):
def _get_cpu_temp(self, threshold):
max_temp = 0
for temp_path in self._temp_paths:
- temp = int(self._device.shell(['cat', temp_path]).rstrip())
+ temp = int(self._device.shell(['cat', temp_path])[0].rstrip())
max_temp = max(max_temp, temp)
if temp >= threshold:
return temp
@@ -173,7 +173,7 @@ def disable_dropbox(device):
device.wait()
device.shell(['rm', '-rf', '/system/data/dropbox'])
original_dropbox_max_files = device.shell(
- ['settings', 'get', 'global', 'dropbox_max_files']).rstrip()
+ ['settings', 'get', 'global', 'dropbox_max_files'])[0].rstrip()
device.shell(['settings', 'put', 'global', 'dropbox_max_files', '0'])
return original_dropbox_max_files
@@ -244,7 +244,8 @@ def filter_event_tags(tags, device):
"""Drop unknown tags not listed in device's event-log-tags file."""
device.wait()
supported_tags = set()
- for l in device.shell(['cat', '/system/etc/event-log-tags']).splitlines():
+ for l in device.shell(
+ ['cat', '/system/etc/event-log-tags'])[0].splitlines():
tokens = l.split(' ')
if len(tokens) >= 2:
supported_tags.add(tokens[1])