Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f656b683 authored by Yasuhiro Matsuda's avatar Yasuhiro Matsuda Committed by Android Git Automerger
Browse files

am ada7fa06: Merge "Fix perfboot.py to work with the recent change."

* commit 'ada7fa06':
  Fix perfboot.py to work with the recent change.
parents c8a5b0b6 ada7fa06
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -92,7 +92,7 @@ class IntervalAdjuster(object):
        self._interval = interval
        self._interval = interval
        self._device = device
        self._device = device
        self._temp_paths = device.shell(
        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._product = device.get_prop('ro.build.product')
        self._waited = False
        self._waited = False


@@ -109,7 +109,7 @@ class IntervalAdjuster(object):
    def _get_cpu_temp(self, threshold):
    def _get_cpu_temp(self, threshold):
        max_temp = 0
        max_temp = 0
        for temp_path in self._temp_paths:
        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)
            max_temp = max(max_temp, temp)
            if temp >= threshold:
            if temp >= threshold:
                return temp
                return temp
@@ -173,7 +173,7 @@ def disable_dropbox(device):
    device.wait()
    device.wait()
    device.shell(['rm', '-rf', '/system/data/dropbox'])
    device.shell(['rm', '-rf', '/system/data/dropbox'])
    original_dropbox_max_files = device.shell(
    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'])
    device.shell(['settings', 'put', 'global', 'dropbox_max_files', '0'])
    return original_dropbox_max_files
    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."""
    """Drop unknown tags not listed in device's event-log-tags file."""
    device.wait()
    device.wait()
    supported_tags = set()
    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(' ')
        tokens = l.split(' ')
        if len(tokens) >= 2:
        if len(tokens) >= 2:
            supported_tags.add(tokens[1])
            supported_tags.add(tokens[1])