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

Unified Diff: build/android/host_heartbeat.py

Issue 1101603002: [Android] Rework device filtering and add DeviceUtils.HealthyDevices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: perezju comments Created 5 years, 8 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/adb_reverse_forwarder.py ('k') | build/android/provision_devices.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/host_heartbeat.py
diff --git a/build/android/host_heartbeat.py b/build/android/host_heartbeat.py
index 11421ce74f6d4f9ebafb5fd0052fb727f9e89763..6a7cdd1d8e6bdb96e1b29f0725fac5f82f811b15 100755
--- a/build/android/host_heartbeat.py
+++ b/build/android/host_heartbeat.py
@@ -12,8 +12,6 @@ This heart beat lets the devices know that they are connected to a host.
import sys
import time
-from pylib.device import adb_wrapper
-from pylib.device import device_filter
from pylib.device import device_utils
PULSE_PERIOD = 20
@@ -21,11 +19,10 @@ PULSE_PERIOD = 20
def main():
while True:
try:
- devices = adb_wrapper.AdbWrapper.Devices(
- filters=device_filter.DefaultFilters())
+ devices = device_utils.DeviceUtils.HealthyDevices()
for d in devices:
- device_utils.DeviceUtils(d).RunShellCommand(
- ['touch', '/sdcard/host_heartbeat'], check_return=True)
+ d.RunShellCommand(['touch', '/sdcard/host_heartbeat'],
+ check_return=True)
except:
# Keep the heatbeat running bypassing all errors.
pass
« no previous file with comments | « build/android/adb_reverse_forwarder.py ('k') | build/android/provision_devices.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698