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

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

Issue 796503004: [Android] Work around pm path bug in L. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + fix tests Created 6 years 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 | build/android/pylib/device/device_utils_test.py » ('j') | 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 c754caa91edc87f955607176536d7dee02371b93..f461b2802529176da22f9017485e3d9e2a5746dc 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -256,8 +256,14 @@ class DeviceUtils(object):
Returns:
Path to the apk on the device if it exists, None otherwise.
"""
+ # 'pm path' is liable to incorrectly exit with a nonzero number starting
+ # in Lollipop.
+ # TODO(jbudorick): Check if this is fixed as new Android versions are
+ # released to put an upper bound on this.
+ should_check_return = (self.build_version_sdk <
+ constants.ANDROID_SDK_VERSION_CODES.LOLLIPOP)
output = self.RunShellCommand(['pm', 'path', package], single_line=True,
- check_return=True)
+ check_return=should_check_return)
if not output:
return None
if not output.startswith('package:'):
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698