Dialer: Fix crash when trying to close system dialogs

* https://developer.android.com/about/versions/12/behavior-changes-all#close-system-dialogs
* I tried removing it but then calling back someone does so behind the
  notification drawer
* Since this is a system app we can still use it but have to allow the
  permission and whitelist it

Change-Id: I946bb41d962e8e70a67ab7b55c866084561f7aa0
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 8fb5590..73e9c2a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -106,6 +106,9 @@
     <!-- Required when the "Enable Do Not Disturb during call" setting is enabled -->
     <uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
 
+    <!-- Required to close the notification shade -->
+    <uses-permission android:name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS" />
+
     <application
         android:name="com.android.dialer.binary.aosp.AospDialerApplication"
         android:appCategory="social"
diff --git a/privapp_whitelist_com.android.dialer-ext.xml b/privapp_whitelist_com.android.dialer-ext.xml
index 09e6e0f..814e88e 100644
--- a/privapp_whitelist_com.android.dialer-ext.xml
+++ b/privapp_whitelist_com.android.dialer-ext.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-     Copyright (C) 2019-2020 The LineageOS Project
+     Copyright (C) 2019-2023 The LineageOS Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -18,5 +18,6 @@
     <!-- Additional permissions on top of privapp_whitelist_com.android.dialer.xml -->
     <privapp-permissions package="com.android.dialer">
         <permission name="android.permission.CAPTURE_AUDIO_OUTPUT"/>
+        <permission name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS"/>
     </privapp-permissions>
 </permissions>