diff options
author | Insaf Latypov <saferif@google.com> | 2017-03-13 14:27:56 +0000 |
---|---|---|
committer | Insaf Latypov <saferif@google.com> | 2017-03-13 14:32:01 +0000 |
commit | 7a85e460aafe155e441a3277a5e64c57b232d096 (patch) | |
tree | 983644062fbbd3f0a726d4252e3acee2e6cc7855 | |
parent | 02bdd5acea8963e7297949b904ded4d94ddec7e0 (diff) | |
download | AfwTestHarness-7a85e460aafe155e441a3277a5e64c57b232d096.tar.gz |
Added turning off NFC by default.
In the lab when devices are constantly located next to each other, they
start to send bumps to each other. To prevent this from happening,
command to turn off NFC is added to device preparation.
Change-Id: I98d0fdf5c1139fb6c09c5aaaeac34616533eab69
-rw-r--r-- | tests/NfcProvisioning/AndroidTest.xml | 5 | ||||
-rw-r--r-- | tools/tradefed-host/res/config/afw-test-common.xml | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/NfcProvisioning/AndroidTest.xml b/tests/NfcProvisioning/AndroidTest.xml index 56257f8..eb8f1bf 100644 --- a/tests/NfcProvisioning/AndroidTest.xml +++ b/tests/NfcProvisioning/AndroidTest.xml @@ -34,6 +34,11 @@ <option name="test-file-name" value="AfwTestNfcProvisioningTestCases.apk"/> </target_preparer> + <!-- Turn on NFC --> + <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> + <option name="run-command" value="svc nfc enable" /> + </target_preparer> + <test class="com.android.afwtest.tradefed.testtype.AfwAndroidJUnitTest"> <option name="package" value="com.android.afwtest.nfcprovisioning"/> </test> diff --git a/tools/tradefed-host/res/config/afw-test-common.xml b/tools/tradefed-host/res/config/afw-test-common.xml index d6287cf..57b7efe 100644 --- a/tools/tradefed-host/res/config/afw-test-common.xml +++ b/tools/tradefed-host/res/config/afw-test-common.xml @@ -24,6 +24,8 @@ <option name="run-command" value="setprop persist.sys.no_req_encrypt true"/> <!-- Set device screen always on. --> <option name="run-command" value="svc power stayon true"/> + <!-- Turn off NFC to avoid devices sending bumps to each other --> + <option name="run-command" value="svc nfc disable" /> <!-- Disable package verification --> <option name="run-command" value="settings put global package_verifier_enable 0" /> <!-- Increase logcat buffer size --> |