Disable automotive short notice for WM CTS tests

Setting this secure setting should not have any effect to other
verticals. For automotive, it ensures that the tests aren't affected by
the short notice shown on every reboot.

Bug: 142662406
Test: make cts && cts-tradefed run cts -t android.server.wm.MultiDisplayLockedKeyguardTests#testDismissKeyguard_whileOccluded_secondaryDisplay -m CtsWindowManagerDeviceTestCases
Change-Id: Id56601ebc51eeadd26bbf96df9c00d50b09bf50d
diff --git a/tests/framework/base/windowmanager/AndroidTest.xml b/tests/framework/base/windowmanager/AndroidTest.xml
index fed61d7..62bb294 100644
--- a/tests/framework/base/windowmanager/AndroidTest.xml
+++ b/tests/framework/base/windowmanager/AndroidTest.xml
@@ -45,6 +45,13 @@
         <option name="test-file-name" value="CtsDragAndDropTargetAppSdk23.apk"/>
         <option name="test-file-name" value="CtsDeviceAlertWindowTestAppSdk25.apk"/>
     </target_preparer>
+    <!-- Necessary for Automotive devices - no-op for other Android verticals -->
+    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
+        <option name="run-command"
+                value="settings put secure android.car.ENABLE_INITIAL_NOTICE_SCREEN_TO_USER 0" />
+        <option name="teardown-command"
+                value="settings put secure android.car.ENABLE_INITIAL_NOTICE_SCREEN_TO_USER 1" />
+    </target_preparer>
     <test class="com.android.tradefed.testtype.AndroidJUnitTest">
         <option name="package" value="android.server.wm.cts"/>
         <option name="runtime-hint" value="1h"/>