Add allowed_privapp_com.android.carshell to car shell

This change also adds the following permissions to car shell:

- android.permission.INSTALL_PACKAGES
- android.car.permission.CAR_CONTROL_AUDIO_SETTINGS
- android.permission.MEDIA_CONTENT_CONTROL

Bug: 159367295
Test: make && emulator
Change-Id: If948f0de699d796b7a16bd024ca4a1139dd7ddd9
Merged-In: If948f0de699d796b7a16bd024ca4a1139dd7ddd9
diff --git a/packages/CarShell/Android.bp b/packages/CarShell/Android.bp
index 545a2c5..88e0ac9 100644
--- a/packages/CarShell/Android.bp
+++ b/packages/CarShell/Android.bp
@@ -1,6 +1,7 @@
 android_app {
     name: "CarShell",
     srcs: ["src/**/*.java"],
+    required: ["allowed_privapp_com.android.carshell"],
     platform_apis: true,
     certificate: "platform",
     privileged: true,
diff --git a/packages/CarShell/AndroidManifest.xml b/packages/CarShell/AndroidManifest.xml
index c947a59..39bedc1 100644
--- a/packages/CarShell/AndroidManifest.xml
+++ b/packages/CarShell/AndroidManifest.xml
@@ -21,10 +21,16 @@
         coreApp="true"
         android:sharedUserId="android.uid.shell"
         >
+    <!-- To pass GtsInstallPackagesWhitelistDeviceTestCases b/173156153 -->
+    <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
     <!-- Permission required for ATS tests - AtsCarHostTestCases, AtsCarDeviceApp -->
     <uses-permission android:name="android.car.permission.CAR_DRIVING_STATE" />
     <!-- Permission required for ATS tests - AtsDeviceInfo, AtsAudioDeviceTestCases -->
     <uses-permission android:name="android.car.permission.CAR_CONTROL_AUDIO_VOLUME" />
+    <!-- Permission required for ATS tests - AtsCarTests#CarAudioManagerSystemTest -->
+    <uses-permission android:name="android.car.permission.CAR_CONTROL_AUDIO_SETTINGS" />
+    <!-- Permission required for ATS tests - AtsCarTests#CarAudioManagerSystemTest -->
+    <uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
     <!-- Permissions required for ATS tests - AtsDeviceInfo -->
     <uses-permission android:name="android.car.permission.CAR_DIAGNOSTICS" />
 </manifest>