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

Unified Diff: tools/android/mempressure.py

Issue 285143002: [Android] Convert to DeviceUtils versions of IsOnline, HasRoot, and EnableRoot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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: tools/android/mempressure.py
diff --git a/tools/android/mempressure.py b/tools/android/mempressure.py
index 82fe2206dfd252bf04f9cd05ceaca8a569f578b0..51c5c8fc9ca415842e90fb3c5e322e2bfc185cd1 100755
--- a/tools/android/mempressure.py
+++ b/tools/android/mempressure.py
@@ -86,7 +86,11 @@ def main(argv):
device = device_utils.DeviceUtils(None)
- device.old_interface.EnableAdbRoot()
+ try:
+ device.EnableRoot()
+ except device_errors.CommandFailedError:
+ # Try to change the flags and start the activity anyway.
+ pass
flags = flag_changer.FlagChanger(device, package_info.cmdline_file)
if ENABLE_TEST_INTENTS_FLAG not in flags.Get():
flags.AddFlags([ENABLE_TEST_INTENTS_FLAG])

Powered by Google App Engine
This is Rietveld 408576698