Listeners of active emergency numbers
1) Introduce a new signature-level system permission allowing system apps to listen the
active emergency number, placed by calls or texts.
2) Add PhoneStateListener API surface to provide a mechanism to listen the
outgoing call emergency number or outgoing sms emergency number.
Bug: 135204580
Test: atest
Change-Id: I6e6bce6d4b97d492ca20302002911f9daa20767e
Merged-In: I6e6bce6d4b97d492ca20302002911f9daa20767e
(cherry picked from commit 7a1eb6d56b3fb37c746664887b6f754e8d09d715)
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 02eed9a7..6b4c757 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1968,6 +1968,12 @@
<permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
android:protectionLevel="signature|privileged" />
+ <!-- @SystemApi Allows read access to emergency number information for ongoing calls or SMS
+ sessions.
+ @hide Used internally. -->
+ <permission android:name="android.permission.READ_ACTIVE_EMERGENCY_SESSION"
+ android:protectionLevel="signature" />
+
<!-- @SystemApi Protects the ability to register any PhoneAccount with
PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION. This capability indicates that the PhoneAccount
corresponds to a device SIM.