Fix inprocess test helper apps.

Bug: 161007415
Test: atest PermissionControllerInProcessTests
Change-Id: I2c406aa6af3725bf76630160083f9c2323556d96
diff --git a/tests/inprocess/AppThatDefinesAdditionalPermission/Android.bp b/tests/inprocess/AppThatDefinesAdditionalPermission/Android.bp
index e69de29..4d43f89 100644
--- a/tests/inprocess/AppThatDefinesAdditionalPermission/Android.bp
+++ b/tests/inprocess/AppThatDefinesAdditionalPermission/Android.bp
@@ -0,0 +1,23 @@
+//
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+android_test_helper_app {
+    name: "AppThatDefinesAdditionalPermission",
+
+    sdk_version: "current",
+
+    test_suites: [ "device-tests" ],
+}
diff --git a/tests/inprocess/AppThatDefinesAdditionalPermission/AndroidManifest.xml b/tests/inprocess/AppThatDefinesAdditionalPermission/AndroidManifest.xml
index e69de29..6c6424e 100644
--- a/tests/inprocess/AppThatDefinesAdditionalPermission/AndroidManifest.xml
+++ b/tests/inprocess/AppThatDefinesAdditionalPermission/AndroidManifest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.permissioncontroller.tests.appthatdefinespermission">
+
+    <permission android:name="com.android.permissioncontroller.tests.A"
+        android:protectionLevel="dangerous"
+        android:label="@string/perm_a"
+        android:description="@string/perm_a" />
+
+    <permission android:name="com.android.permissioncontroller.tests.B"
+                android:protectionLevel="normal"
+                android:label="@string/perm_b"
+                android:description="@string/perm_b" />
+
+    <permission android:name="com.android.permissioncontroller.tests.C"
+                android:protectionLevel="normal"
+                android:label="@string/perm_c"
+                android:description="@string/perm_c" />
+
+    <application />
+</manifest>
+
diff --git a/tests/inprocess/AppThatDefinesAdditionalPermission/res/values/strings.xml b/tests/inprocess/AppThatDefinesAdditionalPermission/res/values/strings.xml
index e69de29..3edf16c 100644
--- a/tests/inprocess/AppThatDefinesAdditionalPermission/res/values/strings.xml
+++ b/tests/inprocess/AppThatDefinesAdditionalPermission/res/values/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="perm_a">Permission A</string>
+    <string name="perm_b">Permission B</string>
+    <string name="perm_c">Permission C</string>
+</resources>
diff --git a/tests/inprocess/AppThatUsesAdditionalPermission/Android.bp b/tests/inprocess/AppThatUsesAdditionalPermission/Android.bp
index e69de29..ab5e598 100644
--- a/tests/inprocess/AppThatUsesAdditionalPermission/Android.bp
+++ b/tests/inprocess/AppThatUsesAdditionalPermission/Android.bp
@@ -0,0 +1,23 @@
+//
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+android_test_helper_app {
+    name: "AppThatUsesAdditionalPermission",
+
+    sdk_version: "current",
+
+    test_suites: [ "device-tests" ],
+}
diff --git a/tests/inprocess/AppThatUsesAdditionalPermission/AndroidManifest.xml b/tests/inprocess/AppThatUsesAdditionalPermission/AndroidManifest.xml
index e69de29..85de1b8 100644
--- a/tests/inprocess/AppThatUsesAdditionalPermission/AndroidManifest.xml
+++ b/tests/inprocess/AppThatUsesAdditionalPermission/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.permissioncontroller.tests.appthatrequestpermission">
+
+    <uses-permission android:name="com.android.permissioncontroller.tests.A" />
+    <uses-permission android:name="com.android.permissioncontroller.tests.B" />
+
+    <application />
+</manifest>
+
diff --git a/tests/inprocess/AppThatUsesStoragePermission/Android.bp b/tests/inprocess/AppThatUsesStoragePermission/Android.bp
index e69de29..da3a8f9 100644
--- a/tests/inprocess/AppThatUsesStoragePermission/Android.bp
+++ b/tests/inprocess/AppThatUsesStoragePermission/Android.bp
@@ -0,0 +1,23 @@
+//
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+android_test_helper_app {
+    name: "AppThatUsesStoragePermission",
+
+    sdk_version: "current",
+
+    test_suites: [ "device-tests" ],
+}
diff --git a/tests/inprocess/AppThatUsesStoragePermission/AndroidManifest.xml b/tests/inprocess/AppThatUsesStoragePermission/AndroidManifest.xml
index e69de29..c9bf2bd 100644
--- a/tests/inprocess/AppThatUsesStoragePermission/AndroidManifest.xml
+++ b/tests/inprocess/AppThatUsesStoragePermission/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.permissioncontroller.tests.appthatrequestpermission">
+
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+
+    <application />
+</manifest>
+
diff --git a/tests/inprocess/AppThatUsesTwoAdditionalPermissions/Android.bp b/tests/inprocess/AppThatUsesTwoAdditionalPermissions/Android.bp
index e69de29..11ac3ce 100644
--- a/tests/inprocess/AppThatUsesTwoAdditionalPermissions/Android.bp
+++ b/tests/inprocess/AppThatUsesTwoAdditionalPermissions/Android.bp
@@ -0,0 +1,23 @@
+//
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+android_test_helper_app {
+    name: "AppThatUsesTwoAdditionalPermissions",
+
+    sdk_version: "current",
+
+    test_suites: [ "device-tests" ],
+}
diff --git a/tests/inprocess/AppThatUsesTwoAdditionalPermissions/AndroidManifest.xml b/tests/inprocess/AppThatUsesTwoAdditionalPermissions/AndroidManifest.xml
index e69de29..c353954 100644
--- a/tests/inprocess/AppThatUsesTwoAdditionalPermissions/AndroidManifest.xml
+++ b/tests/inprocess/AppThatUsesTwoAdditionalPermissions/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2020 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.permissioncontroller.tests.appthatrequestpermission">
+
+    <uses-permission android:name="com.android.permissioncontroller.tests.A" />
+    <uses-permission android:name="com.android.permissioncontroller.tests.B" />
+    <uses-permission android:name="com.android.permissioncontroller.tests.C" />
+
+    <application />
+</manifest>
+