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

Unified Diff: mojo/tools/mopy/android.py

Issue 1151363004: Mojo: Send Android args in a string array, not JSON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 5 years, 6 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 | « mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/mopy/android.py
diff --git a/mojo/tools/mopy/android.py b/mojo/tools/mopy/android.py
index f29bc60630efa0d0af6d2feb34834965b25a9650..50d7df4dacc49b0df72fabf986e2f2bde128646c 100644
--- a/mojo/tools/mopy/android.py
+++ b/mojo/tools/mopy/android.py
@@ -4,7 +4,6 @@
import atexit
import itertools
-import json
import logging
import os
import shutil
@@ -256,13 +255,13 @@ class AndroidShell(object):
max_attempts = 200 if '--wait-for-debugger' in arguments else 5
self._ReadFifo(fifo_path, stdout, on_application_stop, max_attempts)
- # Extract map-origin arguments.
+ # Extract map-origin args and add the extras array with commas escaped.
parameters = [a for a in arguments if not a.startswith(MAPPING_PREFIX)]
map_parameters = [a for a in arguments if a.startswith(MAPPING_PREFIX)]
parameters += self._StartHttpServerForOriginMappings(map_parameters)
-
+ parameters = [p.replace(',', '\,') for p in parameters]
if parameters:
- cmd += ['--es', 'encodedParameters', json.dumps(parameters)]
+ cmd += ['--esa', 'org.chromium.mojo.shell.extras', ','.join(parameters)]
atexit.register(self.StopShell)
with open(os.devnull, 'w') as devnull:
« no previous file with comments | « mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698