Replaced apk_command_line with adb_cast_shell_command_line.

The new script uses the adb_command_line.py script in build/android
and is therefore compatible with the --device argument.

BUG= internal b/26406816

Review URL: https://codereview.chromium.org/1750393003

Cr-Original-Commit-Position: refs/heads/master@{#378780}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 24d7960decb02198c73a9fcd3e847de8e97702fe
This commit is contained in:
sanfin 2016-03-02 10:32:10 -08:00 коммит произвёл Commit bot
Родитель a395077613
Коммит 39b3447310
2 изменённых файлов: 25 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,22 @@
#!/bin/bash
#
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# If no flags are given, prints the current cast shell flags.
#
# Otherwise, the given flags are used to REPLACE (not modify) the cast shell
# flags. For example:
# apk_command_line --enable-media-thread-for-media-playback
#
# If multiple devices are connected, use the --device argument to specify the
# device ID. You can use
# adb devices
# ... to find the device's ID.
#
# To remove all content shell flags, pass an empty string for the flags:
# apk_command_line ""
exec $(dirname $0)/../../build/android/adb_command_line.py -e cast_shell \
--device-path /data/local/tmp/castshell-command-line "$@"

Просмотреть файл

@ -28,6 +28,8 @@ Otherwise: Writes command-line file.
help='Target device for apk to install on.')
parser.add_argument('--device-path', required=True,
help='Remote path to flags file.')
parser.add_argument('-e', '--executable', dest='executable', default='chrome',
help='Name of the executable.')
args, remote_args = parser.parse_known_args()
devil_chromium.Initialize()
@ -71,7 +73,7 @@ Otherwise: Writes command-line file.
# Set flags.
quoted_args = ' '.join(cmd_helper.SingleQuote(x) for x in remote_args)
flags_str = 'chrome %s' % quoted_args
flags_str = ' '.join([args.executable, quoted_args])
def write_flags(device):
device.WriteFile(args.device_path, flags_str, as_root=as_root)