Index: build/android/devil/android/device_utils.py |
diff --git a/build/android/devil/android/device_utils.py b/build/android/devil/android/device_utils.py |
index d372b6303380e96247626bec4e1dede3e427f3a2..03077729e267e5b781443b673baa109f21b6148a 100644 |
--- a/build/android/devil/android/device_utils.py |
+++ b/build/android/devil/android/device_utils.py |
@@ -628,6 +628,8 @@ class DeviceUtils(object): |
retries=None): |
"""Remove the app |package_name| from the device. |
+ This is a no-op if the app is not already installed. |
+ |
Args: |
package_name: The package to uninstall. |
keep_data: (optional) Whether to keep the data and cache directories. |
@@ -639,6 +641,9 @@ class DeviceUtils(object): |
CommandTimeoutError if the uninstallation times out. |
DeviceUnreachableError on missing device. |
""" |
+ installed = self._GetApplicationPathsInternal(package_name) |
jbudorick
2015/09/15 22:36:48
er... hm. Reconsidering this one, as there's now n
agrieve
2015/09/16 01:08:57
GetApplicationPaths is a public method, so if the
|
+ if not installed: |
+ return |
try: |
self.adb.Uninstall(package_name, keep_data) |
self._cache['package_apk_paths'][package_name] = [] |