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

Unified Diff: build/android/devil/android/device_utils.py

Issue 1338813003: GN: Side-load dex files as well as native code in incremental installs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix pylint warnings Created 5 years, 3 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
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 67fbc00fb79458361ad2f98081dd703c3afc027d..79ced379af0fede046cffa0e4d1cc75acc59f204 100644
--- a/build/android/devil/android/device_utils.py
+++ b/build/android/devil/android/device_utils.py
@@ -627,6 +627,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.
@@ -638,6 +640,9 @@ class DeviceUtils(object):
CommandTimeoutError if the uninstallation times out.
DeviceUnreachableError on missing device.
"""
+ installed = self._GetApplicationPathsInternal(package_name)
+ if not installed:
+ return
try:
self.adb.Uninstall(package_name, keep_data)
self._cache['package_apk_paths'][package_name] = []

Powered by Google App Engine
This is Rietveld 408576698