[test] fix SystemUITests
Non-data apps that have a sharedUserId shared with a privileged app and
use privileged permissions need to testOnly.
BUG: 236173905
Fixes: 243736722
BUG: 243736722
Test: atest SystemUITests
Change-Id: I466b4c305fc0882e036298840c04601747882b18
diff --git a/packages/SystemUI/tests/AndroidManifest.xml b/packages/SystemUI/tests/AndroidManifest.xml
index ba28045..0fa3d36 100644
--- a/packages/SystemUI/tests/AndroidManifest.xml
+++ b/packages/SystemUI/tests/AndroidManifest.xml
@@ -53,7 +53,7 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REGISTER_WINDOW_MANAGER_LISTENERS" />
- <application android:debuggable="true" android:largeHeap="true"
+ <application android:debuggable="true" android:largeHeap="true" android:testOnly="true"
android:enableOnBackInvokedCallback="true" >
<uses-library android:name="android.test.runner" />
diff --git a/packages/SystemUI/tests/AndroidTest.xml b/packages/SystemUI/tests/AndroidTest.xml
index 5ffd300..31e7bd2 100644
--- a/packages/SystemUI/tests/AndroidTest.xml
+++ b/packages/SystemUI/tests/AndroidTest.xml
@@ -16,6 +16,7 @@
<configuration description="Runs Tests for SystemUI.">
<target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
<option name="test-file-name" value="SystemUITests.apk" />
+ <option name="install-arg" value="-t" />
</target_preparer>
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">