Enable test harness flag before the test

The test harness must be enabled to alllow the test to interact with
TAPL (launcher), otherwise the test crashes with an "Error granting
runtime permission" exception.

Test: atest FlickerTests
Change-Id: I5fffa4e756fab7ab4abca8a4d301f3c01e1297ce
diff --git a/tests/FlickerTests/AndroidTest.xml b/tests/FlickerTests/AndroidTest.xml
index a331ec5..d83ee3a 100644
--- a/tests/FlickerTests/AndroidTest.xml
+++ b/tests/FlickerTests/AndroidTest.xml
@@ -10,12 +10,14 @@
         <!-- prevents the phone from restarting -->
         <option name="force-skip-system-props" value="true" />
         <!-- set WM tracing verbose level to all -->
-        <option name="run-command" value="adb shell cmd window tracing level all" />
+        <option name="run-command" value="cmd window tracing level all" />
         <!-- inform WM to log all transactions -->
-        <option name="run-command" value="adb shell cmd window tracing transaction" />
+        <option name="run-command" value="cmd window tracing transaction" />
+        <!-- restart launcher to activate TAPL -->
+        <option name="run-command" value="setprop ro.test_harness 1 ; am force-stop com.google.android.apps.nexuslauncher" />
     </target_preparer>
     <target_preparer class="com.android.tradefed.targetprep.DeviceCleaner">
-        <!-- keeps the screen on during tests -->
+        <!-- reboot the device to teardown any crashed tests -->
         <option name="cleanup-action" value="REBOOT" />
     </target_preparer>
     <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">