| OLD | NEW |
| 1 # Copyright 2016 Google Inc. | 1 # Copyright 2016 Google Inc. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 from __future__ import print_function | 6 from __future__ import print_function |
| 7 from _hardware import Hardware | 7 from _hardware import Hardware |
| 8 import sys | 8 import sys |
| 9 import time | 9 import time |
| 10 | 10 |
| 11 class HardwareAndroid(Hardware): | 11 class HardwareAndroid(Hardware): |
| 12 def __init__(self, adb): | 12 def __init__(self, adb): |
| 13 Hardware.__init__(self) | 13 Hardware.__init__(self) |
| 14 self.kick_in_time = 5 | 14 self.warmup_time = 5 |
| 15 self._adb = adb | 15 self._adb = adb |
| 16 self._is_root = self._adb.attempt_root() | 16 self._is_root = self._adb.attempt_root() |
| 17 if self._is_root: | 17 if self._is_root: |
| 18 self._adb.remount() | 18 self._adb.remount() |
| 19 self._initial_airplane_mode = None | 19 self._initial_airplane_mode = None |
| 20 self._initial_location_providers = None | 20 self._initial_location_providers = None |
| 21 self._initial_ASLR = None | 21 self._initial_ASLR = None |
| 22 | 22 |
| 23 def __enter__(self): | 23 def __enter__(self): |
| 24 # turn on airplane mode. | 24 # turn on airplane mode. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 echo "$ZONE ($(cat type)): temp=$TEMP > $TRIPPOINT=$(cat $TRIPPOIN
T)" | 109 echo "$ZONE ($(cat type)): temp=$TEMP > $TRIPPOINT=$(cat $TRIPPOIN
T)" |
| 110 fi | 110 fi |
| 111 fi | 111 fi |
| 112 done | 112 done |
| 113 fi''') | 113 fi''') |
| 114 | 114 |
| 115 Hardware.print_debug_diagnostics(self) | 115 Hardware.print_debug_diagnostics(self) |
| 116 | 116 |
| 117 def sleep(self, sleeptime): | 117 def sleep(self, sleeptime): |
| 118 Hardware.sleep(self, sleeptime) | 118 Hardware.sleep(self, sleeptime) |
| OLD | NEW |