[build/android] Ensure NFC remains disabled

One some Android versions, enabling airport mode is not enough to switch
off NFC on the devices. Running "svc nfc disable", available on M and later,
allows to ensure that NFC always remains off.

BUG=634937

Review-Url: https://codereview.chromium.org/2223013002
Cr-Original-Commit-Position: refs/heads/master@{#410345}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 154947a15a35d3b9b9818bd895f950c0a12ad306
This commit is contained in:
perezju 2016-08-08 06:59:47 -07:00 коммит произвёл Commit bot
Родитель 0aef44ff39
Коммит 6551c2622c
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -288,6 +288,10 @@ def SetProperties(device, options):
if options.disable_network:
device_settings.ConfigureContentSettings(
device, device_settings.NETWORK_DISABLED_SETTINGS)
if device.build_version_sdk >= version_codes.MARSHMALLOW:
# Ensure that NFC is also switched off.
device.RunShellCommand(['svc', 'nfc', 'disable'],
as_root=True, check_return=True)
if options.disable_system_chrome:
# The system chrome version on the device interferes with some tests.