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

Unified Diff: build/android/pylib/device/device_utils.py

Issue 1286763002: device_utils.Install: Calculate host md5s at the same time as device md5s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style nits Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index 8064ce88cb28eccde7773258d5f56f29e21fc78f..30764e3a20cc98535959f28672e24654dc91ad0f 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -19,6 +19,7 @@ import re
import shutil
import sys
import tempfile
+import threading
import time
import zipfile
@@ -1092,8 +1093,15 @@ class DeviceUtils(object):
return ret
def _ComputeStaleApks(self, package_name, host_apk_paths):
- host_checksums = md5sum.CalculateHostMd5Sums(host_apk_paths)
+ host_checksums_holder = [None]
+ def compute_host_checksums():
+ host_checksums_holder[0] = md5sum.CalculateHostMd5Sums(host_apk_paths)
+
+ host_thread = threading.Thread(target=compute_host_checksums)
+ host_thread.start()
device_checksums = self._ComputeDeviceChecksumsForApks(package_name)
+ host_thread.join()
+ host_checksums = host_checksums_holder[0]
stale_apks = [k for (k, v) in host_checksums.iteritems()
if v not in device_checksums]
return stale_apks, set(host_checksums.values())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698