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

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: 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 | 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 1624cccb7596f03d990373e894c233b8576674c6..b715ffd001038fd645200cfee9b21ad9808809dc 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -249,8 +249,12 @@ 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.
+ should_check_return = (self.build_version_sdk <
klundberg 2014/12/12 00:40:06 So this is starting in Lollipop but might be fixed
+ 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698