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

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

Issue 1334303003: DeviceUtils: When skipping "adb install", run "am force-stop" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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
« no previous file with comments | « no previous file | build/android/devil/android/device_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..109b9019d4a371588ef917f095e3e109814bc02b 100644
--- a/build/android/devil/android/device_utils.py
+++ b/build/android/devil/android/device_utils.py
@@ -617,6 +617,10 @@ class DeviceUtils(object):
# Upon success, we know the device checksums, but not their paths.
if host_checksums is not None:
self._cache['package_apk_checksums'][package_name] = host_checksums
+ else:
+ # Running adb install terminates running instances of the app, so to be
+ # consistent, we explicitly terminate it when skipping the install.
+ self.ForceStop(package_name)
if (permissions is None
and self.build_version_sdk >= version_codes.MARSHMALLOW):
« no previous file with comments | « no previous file | build/android/devil/android/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698