#!/usr/bin/env vpython3 # Copyright 2015 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.
"""Utility for reading / writing command-line flag files on device(s)."""
from __future__ import print_function
import argparse import logging import sys
import devil_chromium
from devil.android import device_errors from devil.android import device_utils from devil.android import flag_changer from devil.android.tools import script_common from devil.utils import cmd_helper from devil.utils import logging_common
def CheckBuildTypeSupportsFlags(device, command_line_flags_file):
is_webview = command_line_flags_file == 'webview-command-line' if device.IsUserBuild() and is_webview: raise device_errors.CommandFailedError( 'WebView only respects flags on a userdebug or eng device, yours ' 'is a user build.', device) elif device.IsUserBuild():
logging.warning( 'Your device (%s) is a user build; Chrome may or may not pick up ' 'your commandline flags. Check your ' '"command_line_on_non_rooted_enabled" preference, or switch ' 'devices.', device)
No flags: Prints existing command-line file.
Empty string: Deletes command-line file.
Otherwise: Writes command-line file.
'''
parser.add_argument('--name', required=True,
help='Name of file where to store flags on the device.')
parser.add_argument('-e', '--executable', dest='executable', default='chrome',
help='(deprecated) No longer used.')
script_common.AddEnvironmentArguments(parser)
script_common.AddDeviceArguments(parser)
logging_common.AddLoggingArguments(parser)
print('%sCurrent flags (in %s):' % (action, args.name)) for d, desc, flags in updated_values: if flags: # Shell-quote flags for easy copy/paste as new args on the terminal.
quoted_flags = ' '.join(cmd_helper.SingleQuote(f) for f in sorted(flags)) else:
quoted_flags = '( empty )'
print(' %s (%s): %s' % (d, desc, quoted_flags))
return 0
if __name__ == '__main__':
sys.exit(main())
Messung V0.5
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.