[automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: b5f02086d7 -s ours am: 57111b7b4c -s ours am: a9532a2242 -s ours

am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/12009113

Change-Id: Ia4d70665aa9f46a24a795a691b8d339a98285dc4
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 7c57599..327d0a2 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -15,80 +15,75 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
-        package="com.android.server.telecom"
-        coreApp="true"
-        android:sharedUserId="android.uid.system">
+     xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+     package="com.android.server.telecom"
+     coreApp="true"
+     android:sharedUserId="android.uid.system">
 
-    <protected-broadcast android:name="android.intent.action.SHOW_MISSED_CALLS_NOTIFICATION" />
-    <protected-broadcast android:name="com.android.server.telecom.MESSAGE_SENT" />
+    <protected-broadcast android:name="android.intent.action.SHOW_MISSED_CALLS_NOTIFICATION"/>
+    <protected-broadcast android:name="com.android.server.telecom.MESSAGE_SENT"/>
 
 
     <!-- Prevents the activity manager from delaying any activity-start
          requests by this package, including requests immediately after
          the user presses "home". -->
-    <uses-permission android:name="android.permission.BIND_CONNECTION_SERVICE" />
-    <uses-permission android:name="android.permission.BIND_INCALL_SERVICE" />
-    <uses-permission android:name="android.permission.BLUETOOTH" />
-    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
-    <uses-permission android:name="android.permission.BROADCAST_CALLLOG_INFO" />
-    <uses-permission android:name="android.permission.BROADCAST_PHONE_ACCOUNT_REGISTRATION" />
-    <uses-permission android:name="android.permission.CALL_PRIVILEGED" />
-    <uses-permission android:name="android.permission.HANDLE_CALL_INTENT" />
-    <uses-permission android:name="android.permission.HANDLE_CAR_MODE_CHANGES" />
-    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
-    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
-    <uses-permission android:name="android.permission.MANAGE_USERS" />
-    <uses-permission android:name="android.permission.MANAGE_ROLE_HOLDERS" />
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+    <uses-permission android:name="android.permission.BIND_CONNECTION_SERVICE"/>
+    <uses-permission android:name="android.permission.BIND_INCALL_SERVICE"/>
+    <uses-permission android:name="android.permission.BLUETOOTH"/>
+    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
+    <uses-permission android:name="android.permission.BROADCAST_CALLLOG_INFO"/>
+    <uses-permission android:name="android.permission.BROADCAST_PHONE_ACCOUNT_REGISTRATION"/>
+    <uses-permission android:name="android.permission.CALL_PRIVILEGED"/>
+    <uses-permission android:name="android.permission.HANDLE_CALL_INTENT"/>
+    <uses-permission android:name="android.permission.HANDLE_CAR_MODE_CHANGES"/>
+    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/>
+    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
+    <uses-permission android:name="android.permission.MANAGE_USERS"/>
+    <uses-permission android:name="android.permission.MANAGE_ROLE_HOLDERS"/>
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
     <!-- Required to determine source of ongoing audio recordings. -->
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_ROUTING" />
-    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
-    <uses-permission android:name="android.permission.READ_CALL_LOG" />
-    <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.SEND_SMS" />
-    <uses-permission android:name="android.permission.STOP_APP_SWITCHES" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.WRITE_CALL_LOG" />
-    <uses-permission android:name="android.permission.WAKE_LOCK" />
-    <uses-permission android:name="android.permission.READ_BLOCKED_NUMBERS" />
-    <uses-permission android:name="android.permission.WRITE_BLOCKED_NUMBERS" />
-    <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_ROUTING"/>
+    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
+    <uses-permission android:name="android.permission.READ_CALL_LOG"/>
+    <uses-permission android:name="android.permission.READ_DEVICE_CONFIG"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.SEND_SMS"/>
+    <uses-permission android:name="android.permission.STOP_APP_SWITCHES"/>
+    <uses-permission android:name="android.permission.VIBRATE"/>
+    <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
+    <uses-permission android:name="android.permission.WAKE_LOCK"/>
+    <uses-permission android:name="android.permission.READ_BLOCKED_NUMBERS"/>
+    <uses-permission android:name="android.permission.WRITE_BLOCKED_NUMBERS"/>
+    <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"/>
 
-    <permission
-            android:name="android.permission.BROADCAST_CALLLOG_INFO"
-            android:label="Broadcast the call type/duration information"
-            android:protectionLevel="signature|system"/>
+    <permission android:name="android.permission.BROADCAST_CALLLOG_INFO"
+         android:label="Broadcast the call type/duration information"
+         android:protectionLevel="signature|system"/>
 
-    <permission
-            android:name="android.permission.PROCESS_CALLLOG_INFO"
-            android:label="Register to handle the broadcasted call type/duration information"
-            android:protectionLevel="signature|system"/>
+    <permission android:name="android.permission.PROCESS_CALLLOG_INFO"
+         android:label="Register to handle the broadcasted call type/duration information"
+         android:protectionLevel="signature|system"/>
 
-    <permission
-            android:name="android.permission.BROADCAST_PHONE_ACCOUNT_REGISTRATION"
-            android:label="Broadcast phone account registration"
-            android:protectionLevel="signature|system"/>
+    <permission android:name="android.permission.BROADCAST_PHONE_ACCOUNT_REGISTRATION"
+         android:label="Broadcast phone account registration"
+         android:protectionLevel="signature|system"/>
 
-    <permission
-            android:name="android.permission.PROCESS_PHONE_ACCOUNT_REGISTRATION"
-            android:label="Process phone account registration"
-            android:protectionLevel="signature|system"/>
+    <permission android:name="android.permission.PROCESS_PHONE_ACCOUNT_REGISTRATION"
+         android:label="Process phone account registration"
+         android:protectionLevel="signature|system"/>
 
-    <permission
-            android:name="android.permission.HANDLE_CALL_INTENT"
-            android:label="Protects handling the call intent via the TelecomManager API."
-            android:protectionLevel="signature|system"/>
+    <permission android:name="android.permission.HANDLE_CALL_INTENT"
+         android:label="Protects handling the call intent via the TelecomManager API."
+         android:protectionLevel="signature|system"/>
 
     <application android:label="@string/telecommAppLabel"
-            android:icon="@mipmap/ic_launcher_phone"
-            android:allowBackup="false"
-            android:supportsRtl="true"
-            android:process="system"
-            android:usesCleartextTraffic="false"
-            android:defaultToDeviceProtectedStorage="true"
-            android:directBootAware="true">
+         android:icon="@mipmap/ic_launcher_phone"
+         android:allowBackup="false"
+         android:supportsRtl="true"
+         android:process="system"
+         android:usesCleartextTraffic="false"
+         android:defaultToDeviceProtectedStorage="true"
+         android:directBootAware="true">
 
         <!-- CALL vs CALL_PRIVILEGED vs CALL_EMERGENCY
              We have three different intents through which a call can be initiated each with its
@@ -104,60 +99,61 @@
 
         <!-- Activity that displays UI for managing blocked numbers. -->
         <activity android:name=".settings.BlockedNumbersActivity"
-                  android:label="@string/blocked_numbers"
-                  android:configChanges="orientation|screenSize|keyboardHidden"
-                  android:theme="@style/Theme.Telecom.BlockedNumbers"
-                  android:process=":ui"
-                  android:exported="true">
+             android:label="@string/blocked_numbers"
+             android:configChanges="orientation|screenSize|keyboardHidden"
+             android:theme="@style/Theme.Telecom.BlockedNumbers"
+             android:process=":ui"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.telecom.action.MANAGE_BLOCKED_NUMBERS" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.telecom.action.MANAGE_BLOCKED_NUMBERS"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
         </activity>
 
         <activity android:name=".settings.CallBlockDisabledActivity"
-                android:configChanges="keyboardHidden|orientation|screenSize"
-                android:excludeFromRecents="true"
-                android:launchMode="singleInstance"
-                android:theme="@style/Theme.Telecomm.Transparent"
-                android:process=":ui">
+             android:configChanges="keyboardHidden|orientation|screenSize"
+             android:excludeFromRecents="true"
+             android:launchMode="singleInstance"
+             android:theme="@style/Theme.Telecomm.Transparent"
+             android:process=":ui">
         </activity>
 
         <!-- Activity that starts the outgoing call process by listening to CALL intent which
-             contain contact information in the intent's data. CallActivity handles any data
-             URL with the schemes "tel", "sip", and "voicemail". It also handles URLs linked to
-             contacts provider entries. Any data not fitting the schema described is ignored. -->
+                         contain contact information in the intent's data. CallActivity handles any data
+                         URL with the schemes "tel", "sip", and "voicemail". It also handles URLs linked to
+                         contacts provider entries. Any data not fitting the schema described is ignored. -->
         <activity android:name=".components.UserCallActivity"
-                android:label="@string/userCallActivityLabel"
-                android:theme="@style/Theme.Telecomm.Transparent"
-                android:permission="android.permission.CALL_PHONE"
-                android:excludeFromRecents="true"
-                android:process=":ui">
+             android:label="@string/userCallActivityLabel"
+             android:theme="@style/Theme.Telecomm.Transparent"
+             android:permission="android.permission.CALL_PHONE"
+             android:excludeFromRecents="true"
+             android:process=":ui"
+             android:exported="true">
             <!-- CALL action intent filters for the various ways of initiating an outgoing call. -->
             <intent-filter>
-                <action android:name="android.intent.action.CALL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="tel" />
+                <action android:name="android.intent.action.CALL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="tel"/>
             </intent-filter>
             <!-- Specify an icon for SIP calls so that quick contacts widget shows a special SIP
-                 icon for calls to SIP addresses. -->
+                                 icon for calls to SIP addresses. -->
             <intent-filter android:icon="@drawable/ic_launcher_sip_call">
-                <action android:name="android.intent.action.CALL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="sip" />
+                <action android:name="android.intent.action.CALL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="sip"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.CALL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="voicemail" />
+                <action android:name="android.intent.action.CALL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="voicemail"/>
             </intent-filter>
             <!-- Omit default category below so that all Intents sent to this filter must be
-                 explicit. -->
+                                 explicit. -->
             <intent-filter>
-                <action android:name="android.intent.action.CALL" />
-                <data android:mimeType="vnd.android.cursor.item/phone" />
-                <data android:mimeType="vnd.android.cursor.item/phone_v2" />
-                <data android:mimeType="vnd.android.cursor.item/person" />
+                <action android:name="android.intent.action.CALL"/>
+                <data android:mimeType="vnd.android.cursor.item/phone"/>
+                <data android:mimeType="vnd.android.cursor.item/phone_v2"/>
+                <data android:mimeType="vnd.android.cursor.item/person"/>
             </intent-filter>
         </activity>
 
@@ -167,30 +163,30 @@
              processed. High priority of 1000 is used in all intent filters to prevent anything but
              the system from processing this intent (b/8871505). -->
         <activity-alias android:name="PrivilegedCallActivity"
-                android:targetActivity=".components.UserCallActivity"
-                android:permission="android.permission.CALL_PRIVILEGED"
-                android:process=":ui">
+             android:targetActivity=".components.UserCallActivity"
+             android:permission="android.permission.CALL_PRIVILEGED"
+             android:process=":ui">
             <intent-filter android:priority="1000">
-                <action android:name="android.intent.action.CALL_PRIVILEGED" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="tel" />
+                <action android:name="android.intent.action.CALL_PRIVILEGED"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="tel"/>
             </intent-filter>
             <intent-filter android:priority="1000"
-                    android:icon="@drawable/ic_launcher_sip_call">
-                <action android:name="android.intent.action.CALL_PRIVILEGED" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="sip" />
+                 android:icon="@drawable/ic_launcher_sip_call">
+                <action android:name="android.intent.action.CALL_PRIVILEGED"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="sip"/>
             </intent-filter>
             <intent-filter android:priority="1000">
-                <action android:name="android.intent.action.CALL_PRIVILEGED" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="voicemail" />
+                <action android:name="android.intent.action.CALL_PRIVILEGED"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="voicemail"/>
             </intent-filter>
             <intent-filter android:priority="1000">
-                <action android:name="android.intent.action.CALL_PRIVILEGED" />
-                <data android:mimeType="vnd.android.cursor.item/phone" />
-                <data android:mimeType="vnd.android.cursor.item/phone_v2" />
-                <data android:mimeType="vnd.android.cursor.item/person" />
+                <action android:name="android.intent.action.CALL_PRIVILEGED"/>
+                <data android:mimeType="vnd.android.cursor.item/phone"/>
+                <data android:mimeType="vnd.android.cursor.item/phone_v2"/>
+                <data android:mimeType="vnd.android.cursor.item/person"/>
             </intent-filter>
         </activity-alias>
 
@@ -200,123 +196,129 @@
              1000 is used in all intent filters to prevent anything but the system from processing
              this intent (b/8871505). -->
         <!-- TODO: Is there really a notion of an emergency SIP number? If not, can
-             that scheme be removed from this activity? -->
+                         that scheme be removed from this activity? -->
         <activity-alias android:name="EmergencyCallActivity"
-                android:targetActivity=".components.UserCallActivity"
-                android:permission="android.permission.CALL_PRIVILEGED"
-                android:process=":ui">
+             android:targetActivity=".components.UserCallActivity"
+             android:permission="android.permission.CALL_PRIVILEGED"
+             android:process=":ui">
             <intent-filter android:priority="1000">
-                <action android:name="android.intent.action.CALL_EMERGENCY" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="tel" />
+                <action android:name="android.intent.action.CALL_EMERGENCY"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="tel"/>
             </intent-filter>
             <intent-filter android:priority="1000"
-                    android:icon="@drawable/ic_launcher_sip_call">
-                <action android:name="android.intent.action.CALL_EMERGENCY" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="sip" />
+                 android:icon="@drawable/ic_launcher_sip_call">
+                <action android:name="android.intent.action.CALL_EMERGENCY"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="sip"/>
             </intent-filter>
             <intent-filter android:priority="1000">
-                <action android:name="android.intent.action.CALL_EMERGENCY" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="voicemail" />
+                <action android:name="android.intent.action.CALL_EMERGENCY"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="voicemail"/>
             </intent-filter>
             <intent-filter android:priority="1000">
-                <action android:name="android.intent.action.CALL_EMERGENCY" />
-                <data android:mimeType="vnd.android.cursor.item/phone" />
-                <data android:mimeType="vnd.android.cursor.item/phone_v2" />
-                <data android:mimeType="vnd.android.cursor.item/person" />
+                <action android:name="android.intent.action.CALL_EMERGENCY"/>
+                <data android:mimeType="vnd.android.cursor.item/phone"/>
+                <data android:mimeType="vnd.android.cursor.item/phone_v2"/>
+                <data android:mimeType="vnd.android.cursor.item/person"/>
             </intent-filter>
         </activity-alias>
 
-        <receiver android:name=".components.TelecomBroadcastReceiver" android:exported="false"
-                android:process="system">
+        <receiver android:name=".components.TelecomBroadcastReceiver"
+             android:exported="false"
+             android:process="system">
             <intent-filter>
-                <action android:name="com.android.server.telecom.ACTION_CLEAR_MISSED_CALLS" />
-                <action android:name="com.android.server.telecom.ACTION_CALL_BACK_FROM_NOTIFICATION" />
-                <action android:name="com.android.server.telecom.ACTION_SEND_SMS_FROM_NOTIFICATION" />
-                <action android:name="com.android.server.telecom.ACTION_ANSWER_FROM_NOTIFICATION" />
-                <action android:name="com.android.server.telecom.ACTION_REJECT_FROM_NOTIFICATION" />
-                <action android:name="com.android.server.telecom.PROCEED_WITH_CALL" />
-                <action android:name="com.android.server.telecom.CANCEL_CALL" />
-                <action android:name="com.android.server.telecom.PROCEED_WITH_REDIRECTED_CALL" />
-                <action android:name="com.android.server.telecom.CANCEL_REDIRECTED_CALL" />
+                <action android:name="com.android.server.telecom.ACTION_CLEAR_MISSED_CALLS"/>
+                <action android:name="com.android.server.telecom.ACTION_CALL_BACK_FROM_NOTIFICATION"/>
+                <action android:name="com.android.server.telecom.ACTION_SEND_SMS_FROM_NOTIFICATION"/>
+                <action android:name="com.android.server.telecom.ACTION_ANSWER_FROM_NOTIFICATION"/>
+                <action android:name="com.android.server.telecom.ACTION_REJECT_FROM_NOTIFICATION"/>
+                <action android:name="com.android.server.telecom.PROCEED_WITH_CALL"/>
+                <action android:name="com.android.server.telecom.CANCEL_CALL"/>
+                <action android:name="com.android.server.telecom.PROCEED_WITH_REDIRECTED_CALL"/>
+                <action android:name="com.android.server.telecom.CANCEL_REDIRECTED_CALL"/>
             </intent-filter>
         </receiver>
 
         <receiver android:name=".components.AppUninstallBroadcastReceiver"
-                android:process="system">
+             android:process="system"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
-                <data android:scheme="package" />
+                <action android:name="android.intent.action.PACKAGE_FULLY_REMOVED"/>
+                <data android:scheme="package"/>
             </intent-filter>
         </receiver>
 
         <activity android:name=".RespondViaSmsSettings"
-                  android:label="@string/respond_via_sms_setting_title"
-                  android:configChanges="orientation|screenSize|keyboardHidden"
-                  android:theme="@style/Theme.Telecom.DialerSettings"
-                  android:process=":ui">
+             android:label="@string/respond_via_sms_setting_title"
+             android:configChanges="orientation|screenSize|keyboardHidden"
+             android:theme="@style/Theme.Telecom.DialerSettings"
+             android:process=":ui"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <action android:name="android.telecom.action.SHOW_RESPOND_VIA_SMS_SETTINGS" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.intent.action.MAIN"/>
+                <action android:name="android.telecom.action.SHOW_RESPOND_VIA_SMS_SETTINGS"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
         </activity>
 
         <activity android:name=".settings.EnableAccountPreferenceActivity"
-                  android:label="@string/enable_account_preference_title"
-                  android:configChanges="orientation|screenSize|keyboardHidden"
-                  android:theme="@style/Theme.Telecom.DialerSettings"
-                  android:process=":ui">
+             android:label="@string/enable_account_preference_title"
+             android:configChanges="orientation|screenSize|keyboardHidden"
+             android:theme="@style/Theme.Telecom.DialerSettings"
+             android:process=":ui"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
         </activity>
 
         <activity android:name=".components.ErrorDialogActivity"
-                android:configChanges="orientation|screenSize|keyboardHidden"
-                android:excludeFromRecents="true"
-                android:launchMode="singleInstance"
-                android:theme="@style/Theme.Telecomm.Transparent"
-                android:process=":ui">
+             android:configChanges="orientation|screenSize|keyboardHidden"
+             android:excludeFromRecents="true"
+             android:launchMode="singleInstance"
+             android:theme="@style/Theme.Telecomm.Transparent"
+             android:process=":ui">
         </activity>
 
         <activity android:name=".ui.ConfirmCallDialogActivity"
-                android:configChanges="orientation|screenSize|keyboardHidden"
-                android:excludeFromRecents="true"
-                android:launchMode="singleInstance"
-                android:theme="@style/Theme.Telecomm.Transparent"
-                android:process=":ui">
+             android:configChanges="orientation|screenSize|keyboardHidden"
+             android:excludeFromRecents="true"
+             android:launchMode="singleInstance"
+             android:theme="@style/Theme.Telecomm.Transparent"
+             android:process=":ui">
         </activity>
 
         <activity android:name=".ui.CallRedirectionTimeoutDialogActivity"
-                  android:configChanges="orientation|screenSize|keyboardHidden"
-                  android:excludeFromRecents="true"
-                  android:launchMode="singleInstance"
-                  android:theme="@style/Theme.Telecomm.Transparent"
-                  android:process=":ui">
+             android:configChanges="orientation|screenSize|keyboardHidden"
+             android:excludeFromRecents="true"
+             android:launchMode="singleInstance"
+             android:theme="@style/Theme.Telecomm.Transparent"
+             android:process=":ui">
         </activity>
 
         <activity android:name=".ui.TelecomDeveloperMenu"
-                  android:label="@string/developer_title"
-                  android:exported="false"
-                  android:process=":ui" />
+             android:label="@string/developer_title"
+             android:exported="false"
+             android:process=":ui"/>
 
         <service android:name=".components.BluetoothPhoneService"
-                android:singleUser="true"
-                android:process="system">
+             android:singleUser="true"
+             android:process="system"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.bluetooth.IBluetoothHeadsetPhone" />
+                <action android:name="android.bluetooth.IBluetoothHeadsetPhone"/>
             </intent-filter>
         </service>
 
         <service android:name=".components.TelecomService"
-                android:singleUser="true"
-                android:process="system">
+             android:singleUser="true"
+             android:process="system"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.telecom.ITelecomService" />
+                <action android:name="android.telecom.ITelecomService"/>
             </intent-filter>
         </service>
 
diff --git a/res/xml/activity_blocked_numbers.xml b/res/xml/activity_blocked_numbers.xml
index f884ec9..df1a759 100644
--- a/res/xml/activity_blocked_numbers.xml
+++ b/res/xml/activity_blocked_numbers.xml
@@ -75,7 +75,7 @@
                     <TextView
                             android:id="@+id/add_blocked"
                             android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
+                            android:layout_height="48dp"
                             android:text="@string/block_number"
                             android:layout_marginBottom="@dimen/blocked_numbers_button_bottom_margin"
                             android:paddingTop="@dimen/blocked_numbers_button_large_padding"
diff --git a/res/xml/enhanced_call_blocking_settings.xml b/res/xml/enhanced_call_blocking_settings.xml
index 32c4c5d..73ed2af 100644
--- a/res/xml/enhanced_call_blocking_settings.xml
+++ b/res/xml/enhanced_call_blocking_settings.xml
@@ -41,8 +41,4 @@
         android:persistent="false"
         android:defaultValue="false"/>
     <!--Add divider to separate this enhanced call blocking settings from other settings-->
-    <Preference
-        android:key="enhanced_call_blocking_divider"
-        android:persistent="false"
-        android:layout="@xml/layout_divider"/>
 </PreferenceScreen>
\ No newline at end of file
diff --git a/src/com/android/server/telecom/CallIdMapper.java b/src/com/android/server/telecom/CallIdMapper.java
index da2c199..2cd5c79 100644
--- a/src/com/android/server/telecom/CallIdMapper.java
+++ b/src/com/android/server/telecom/CallIdMapper.java
@@ -20,6 +20,7 @@
 
 import com.android.internal.annotations.VisibleForTesting;
 
+import java.util.Collection;
 import java.util.Map;
 
 /** Utility to map {@link Call} objects to unique IDs. IDs are generated when a call is added. */
@@ -71,6 +72,10 @@
             return mSecondaryMap.get(value);
         }
 
+        public Collection<V> getValues() {
+            return mPrimaryMap.values();
+        }
+
         public void clear() {
             mPrimaryMap.clear();
             mSecondaryMap.clear();
@@ -132,6 +137,10 @@
         return mCalls.getValue(callId);
     }
 
+    Collection<Call> getCalls() {
+        return mCalls.getValues();
+    }
+
     void clear() {
         mCalls.clear();
     }
diff --git a/src/com/android/server/telecom/CreateConnectionTimeout.java b/src/com/android/server/telecom/CreateConnectionTimeout.java
index 399c28a..14e5bf0 100644
--- a/src/com/android/server/telecom/CreateConnectionTimeout.java
+++ b/src/com/android/server/telecom/CreateConnectionTimeout.java
@@ -69,7 +69,7 @@
         }
 
         // Timeout is only supported for SIM call managers that are set by the carrier.
-        if (!Objects.equals(connectionManager.getComponentName(),
+        if (connectionManager != null && !Objects.equals(connectionManager.getComponentName(),
                 mPhoneAccountRegistrar.getSystemSimCallManagerComponent())) {
             Log.d(this, "isTimeoutNeededForCall, not a system sim call manager");
             return false;
diff --git a/src/com/android/server/telecom/DefaultDialerCache.java b/src/com/android/server/telecom/DefaultDialerCache.java
index c2b78ee..a4a0242 100644
--- a/src/com/android/server/telecom/DefaultDialerCache.java
+++ b/src/com/android/server/telecom/DefaultDialerCache.java
@@ -217,6 +217,12 @@
         return mSystemDialerComponentName;
     }
 
+    public ComponentName getDialtactsSystemDialerComponent() {
+        final Resources resources = mContext.getResources();
+        return new ComponentName(getSystemDialerApplication(),
+                resources.getString(R.string.dialer_default_class));
+    }
+
     public void observeDefaultDialerApplication(Executor executor, IntConsumer observer) {
         mRoleManagerAdapter.observeDefaultDialerApp(executor, observer);
     }
@@ -289,4 +295,8 @@
     public ContentObserver getContentObserver() {
         return mDefaultDialerObserver;
     }
+
+    public RoleManagerAdapter getRoleManagerAdapter() {
+        return mRoleManagerAdapter;
+    }
 }
\ No newline at end of file
diff --git a/src/com/android/server/telecom/InCallController.java b/src/com/android/server/telecom/InCallController.java
index 228cb3d..7e4113a 100644
--- a/src/com/android/server/telecom/InCallController.java
+++ b/src/com/android/server/telecom/InCallController.java
@@ -20,9 +20,11 @@
 import android.annotation.NonNull;
 import android.app.Notification;
 import android.app.NotificationManager;
+import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
+import android.content.IntentFilter;
 import android.content.ServiceConnection;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
@@ -43,6 +45,7 @@
 import android.telecom.TelecomManager;
 import android.text.TextUtils;
 import android.util.ArrayMap;
+import android.util.ArraySet;
 
 import com.android.internal.annotations.VisibleForTesting;
 // TODO: Needed for move to system service: import com.android.internal.R;
@@ -58,6 +61,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
@@ -322,7 +326,10 @@
                 String packageName = mInCallServiceInfo.getComponentName().getPackageName();
                 mContext.unbindService(mServiceConnection);
                 mIsConnected = false;
-                if (mIsNullBinding) {
+                if (mIsNullBinding && mInCallServiceInfo.getType() != IN_CALL_SERVICE_TYPE_NON_UI) {
+                    // Non-UI InCallServices are allowed to return null from onBind if they don't
+                    // want to handle calls at the moment, so don't report them to the user as
+                    // crashed.
                     sendCrashedInCallServiceNotification(packageName);
                 }
                 if (mCall != null) {
@@ -444,7 +451,7 @@
 
         @Override
         public void disconnect() {
-            Log.i(this, "Disconnect forced!");
+            Log.i(this, "Disconnecting from InCallService");
             if (mIsProxying) {
                 mSubConnection.disconnect();
             } else {
@@ -721,6 +728,20 @@
             }
             pw.decreaseIndent();
         }
+
+        public void addConnections(List<InCallServiceBindingConnection> newConnections) {
+            // connect() needs to be called with a Call object. Since we're in the middle of any
+            // possible number of calls right now, choose an arbitrary one from the ones that
+            // InCallController is tracking.
+            if (mCallIdMapper.getCalls().isEmpty()) {
+                Log.w(InCallController.this, "No calls tracked while adding new NonUi incall");
+                return;
+            }
+            Call callToConnectWith = mCallIdMapper.getCalls().iterator().next();
+            for (InCallServiceBindingConnection newConnection : newConnections) {
+                newConnection.connect(callToConnectWith);
+            }
+        }
     }
 
     private final Call.Listener mCallListener = new Call.ListenerBase() {
@@ -847,6 +868,38 @@
         }
     };
 
+    private BroadcastReceiver mPackageChangedReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            Log.startSession("ICC.pCR");
+            try {
+                if (Intent.ACTION_PACKAGE_CHANGED.equals(intent.getAction())) {
+                    synchronized (mLock) {
+                        String changedPackage = intent.getData().getSchemeSpecificPart();
+                        List<InCallServiceBindingConnection> componentsToBind =
+                                Arrays.stream(intent.getStringArrayExtra(
+                                        Intent.EXTRA_CHANGED_COMPONENT_NAME_LIST))
+                                        .map((className) ->
+                                                ComponentName.createRelative(changedPackage,
+                                                        className))
+                                        .filter(mKnownNonUiInCallServices::contains)
+                                        .flatMap(componentName -> getInCallServiceComponents(
+                                                componentName,
+                                                IN_CALL_SERVICE_TYPE_NON_UI).stream())
+                                        .map(InCallServiceBindingConnection::new)
+                                        .collect(Collectors.toList());
+
+                        if (mNonUIInCallServiceConnections != null) {
+                            mNonUIInCallServiceConnections.addConnections(componentsToBind);
+                        }
+                    }
+                }
+            } finally {
+                Log.endSession();
+            }
+        }
+    };
+
     private final SystemStateListener mSystemStateListener =
             (priority, packageName, isCarMode) -> InCallController.this.handleCarModeChange(
                     priority, packageName, isCarMode);
@@ -875,6 +928,11 @@
     private NonUIInCallServiceConnectionCollection mNonUIInCallServiceConnections;
     private final ClockProxy mClockProxy;
 
+    // A set of known non-UI in call services on the device, including those that are disabled.
+    // We track this so that we can efficiently bind to them when we're notified that a new
+    // component has been enabled.
+    private Set<ComponentName> mKnownNonUiInCallServices = new ArraySet<>();
+
     // Future that's in a completed state unless we're in the middle of binding to a service.
     // The future will complete with true if binding succeeds, false if it timed out.
     private CompletableFuture<Boolean> mBindingFuture = CompletableFuture.completedFuture(true);
@@ -940,7 +998,8 @@
                 ParcelableCall parcelableCall = ParcelableCallUtils.toParcelableCall(call,
                         true /* includeVideoProvider */, mCallsManager.getPhoneAccountRegistrar(),
                         info.isExternalCallsSupported(), includeRttCall,
-                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI);
+                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI ||
+                        info.getType() == IN_CALL_SERVICE_TYPE_NON_UI);
                 try {
                     inCallService.addCall(sanitizeParcelableCallForService(info, parcelableCall));
                 } catch (RemoteException ignored) {
@@ -1004,7 +1063,8 @@
                 ParcelableCall parcelableCall = ParcelableCallUtils.toParcelableCall(call,
                         true /* includeVideoProvider */, mCallsManager.getPhoneAccountRegistrar(),
                         info.isExternalCallsSupported(), includeRttCall,
-                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI);
+                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI ||
+                        info.getType() == IN_CALL_SERVICE_TYPE_NON_UI);
                 try {
                     inCallService.addCall(sanitizeParcelableCallForService(info, parcelableCall));
                 } catch (RemoteException ignored) {
@@ -1034,7 +1094,8 @@
                         false /* supportsExternalCalls */,
                         android.telecom.Call.STATE_DISCONNECTED /* overrideState */,
                         false /* includeRttCall */,
-                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI
+                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI ||
+                        info.getType() == IN_CALL_SERVICE_TYPE_NON_UI
                         );
 
                 try {
@@ -1227,6 +1288,12 @@
      * Unbinds an existing bound connection to the in-call app.
      */
     private void unbindFromServices() {
+        try {
+            mContext.unregisterReceiver(mPackageChangedReceiver);
+        } catch (IllegalArgumentException e) {
+            // Ignore this -- we may or may not have registered it, but when we bind, we want to
+            // unregister no matter what.
+        }
         if (mInCallServiceConnection != null) {
             mInCallServiceConnection.disconnect();
             mInCallServiceConnection = null;
@@ -1312,6 +1379,10 @@
         }
         mNonUIInCallServiceConnections = new NonUIInCallServiceConnectionCollection(nonUIInCalls);
         mNonUIInCallServiceConnections.connect(call);
+
+        IntentFilter packageChangedFilter = new IntentFilter(Intent.ACTION_PACKAGE_CHANGED);
+        packageChangedFilter.addDataScheme("package");
+        mContext.registerReceiver(mPackageChangedReceiver, packageChangedFilter);
     }
 
     private InCallServiceInfo getDefaultDialerComponent() {
@@ -1387,7 +1458,7 @@
         PackageManager packageManager = mContext.getPackageManager();
         for (ResolveInfo entry : packageManager.queryIntentServicesAsUser(
                 serviceIntent,
-                PackageManager.GET_META_DATA,
+                PackageManager.GET_META_DATA | PackageManager.MATCH_DISABLED_COMPONENTS,
                 mCallsManager.getCurrentUserHandle().getIdentifier())) {
             ServiceInfo serviceInfo = entry.serviceInfo;
             if (serviceInfo != null) {
@@ -1400,14 +1471,13 @@
 
                 int currentType = getInCallServiceType(entry.serviceInfo, packageManager,
                         packageName);
-                if (requestedType == 0 || requestedType == currentType) {
-                    if (requestedType == IN_CALL_SERVICE_TYPE_NON_UI) {
-                        // We enforce the rule that self-managed calls are not supported by non-ui
-                        // InCallServices.
-                        isSelfManageCallsSupported = false;
-                    }
-                    retval.add(new InCallServiceInfo(
-                            new ComponentName(serviceInfo.packageName, serviceInfo.name),
+                ComponentName foundComponentName =
+                        new ComponentName(serviceInfo.packageName, serviceInfo.name);
+                if (requestedType == IN_CALL_SERVICE_TYPE_NON_UI) {
+                    mKnownNonUiInCallServices.add(foundComponentName);
+                }
+                if (serviceInfo.enabled && (requestedType == 0 || requestedType == currentType)) {
+                    retval.add(new InCallServiceInfo(foundComponentName,
                             isExternalCallsSupported, isSelfManageCallsSupported, requestedType));
                 }
             }
@@ -1546,7 +1616,8 @@
                         mCallsManager.getPhoneAccountRegistrar(),
                         info.isExternalCallsSupported(),
                         includeRttCall,
-                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI);
+                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI ||
+                        info.getType() == IN_CALL_SERVICE_TYPE_NON_UI);
                 inCallService.addCall(sanitizeParcelableCallForService(info, parcelableCall));
             } catch (RemoteException ignored) {
             }
@@ -1610,7 +1681,8 @@
                         mCallsManager.getPhoneAccountRegistrar(),
                         info.isExternalCallsSupported(),
                         rttInfoChanged && info.equals(mInCallServiceConnection.getInfo()),
-                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI);
+                        info.getType() == IN_CALL_SERVICE_TYPE_SYSTEM_UI ||
+                        info.getType() == IN_CALL_SERVICE_TYPE_NON_UI);
                 ComponentName componentName = info.getComponentName();
                 IInCallService inCallService = entry.getValue();
                 componentsUpdated.add(componentName);
@@ -1701,7 +1773,7 @@
 
         if (TextUtils.isEmpty(ringingPackage)) {
             // The current in-call UI returned nothing, so lets use the default dialer.
-            ringingPackage = mDefaultDialerCache.getDefaultDialerApplication(
+            ringingPackage = mDefaultDialerCache.getRoleManagerAdapter().getDefaultDialerApp(
                     mCallsManager.getCurrentUserHandle().getIdentifier());
             if (ringingPackage != null) {
                 Log.d(this, "doesConnectedDialerSupportRinging: notCurentlyConnectedPackage=%s",
diff --git a/src/com/android/server/telecom/NewOutgoingCallIntentBroadcaster.java b/src/com/android/server/telecom/NewOutgoingCallIntentBroadcaster.java
index f0efe92..86fedd5 100644
--- a/src/com/android/server/telecom/NewOutgoingCallIntentBroadcaster.java
+++ b/src/com/android/server/telecom/NewOutgoingCallIntentBroadcaster.java
@@ -21,7 +21,6 @@
 import android.app.Activity;
 import android.app.BroadcastOptions;
 import android.content.BroadcastReceiver;
-import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
@@ -495,9 +494,7 @@
 
     private void launchSystemDialer(Uri handle) {
         Intent systemDialerIntent = new Intent();
-        systemDialerIntent.setComponent(
-                new ComponentName(mDefaultDialerCache.getSystemDialerApplication(),
-                    mContext.getResources().getString(R.string.dialer_default_class)));
+        systemDialerIntent.setComponent(mDefaultDialerCache.getDialtactsSystemDialerComponent());
         systemDialerIntent.setAction(Intent.ACTION_DIAL);
         systemDialerIntent.setData(handle);
         systemDialerIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
diff --git a/src/com/android/server/telecom/ParcelableCallUtils.java b/src/com/android/server/telecom/ParcelableCallUtils.java
index 5c821a4..a5291e7 100644
--- a/src/com/android/server/telecom/ParcelableCallUtils.java
+++ b/src/com/android/server/telecom/ParcelableCallUtils.java
@@ -42,9 +42,9 @@
 
     /**
      * A list of extra keys which should be removed from a {@link ParcelableCall} when it is being
-     * generated for the purpose of sending to a dialer other than the system dialer.
+     * generated for the purpose of sending to a incallservice other than the system incallservice.
      * By convention we only pass keys namespaced with android.*, however there are some keys which
-     * should not be passed to non-system dialer apps either.
+     * should not be passed to non-system incallservice apps either.
      */
     private static List<String> EXTRA_KEYS_TO_SANITIZE;
     static {
@@ -90,9 +90,9 @@
      *      {@link InCallService} which supports external calls or not.
      * @param includeRttCall {@code true} if the RTT call should be included, {@code false}
      *      otherwise.
-     * @param isForSystemDialer {@code true} if this call is being parcelled for the system dialer,
-     *      {@code false} otherwise.  When parceling for the system dialer, the entire call extras
-     *      is included.  When parceling for anything other than the system dialer, some extra key
+     * @param isForSystemInCallService {@code true} if this call is being parcelled for the system incallservice,
+     *      {@code false} otherwise.  When parceling for the system incallservice, the entire call extras
+     *      is included.  When parceling for anything other than the system incallservice, some extra key
      *      values will be stripped for privacy sake.
      */
     public static ParcelableCall toParcelableCall(
@@ -101,10 +101,10 @@
             PhoneAccountRegistrar phoneAccountRegistrar,
             boolean supportsExternalCalls,
             boolean includeRttCall,
-            boolean isForSystemDialer) {
+            boolean isForSystemInCallService) {
         return toParcelableCall(call, includeVideoProvider, phoneAccountRegistrar,
                 supportsExternalCalls, CALL_STATE_OVERRIDE_NONE /* overrideState */,
-                includeRttCall, isForSystemDialer);
+                includeRttCall, isForSystemInCallService);
     }
 
     /**
@@ -120,9 +120,9 @@
      *      {@link InCallService} which supports external calls or not.
      * @param overrideState When not {@link #CALL_STATE_OVERRIDE_NONE}, use the provided state as an
      *      override to whatever is defined in the call.
-     * @param isForSystemDialer {@code true} if this call is being parcelled for the system dialer,
-     *      {@code false} otherwise.  When parceling for the system dialer, the entire call extras
-     *      is included.  When parceling for anything other than the system dialer, some extra key
+     * @param isForSystemInCallService {@code true} if this call is being parcelled for the system incallservice,
+     *      {@code false} otherwise.  When parceling for the system incallservice, the entire call extras
+     *      is included.  When parceling for anything other than the system incallservice, some extra key
      *      values will be stripped for privacy sake.
      * @return The {@link ParcelableCall} containing all call information from the {@link Call}.
      */
@@ -133,7 +133,7 @@
             boolean supportsExternalCalls,
             int overrideState,
             boolean includeRttCall,
-            boolean isForSystemDialer) {
+            boolean isForSystemInCallService) {
         int state;
         if (overrideState == CALL_STATE_OVERRIDE_NONE) {
             state = getParcelableState(call, supportsExternalCalls);
@@ -216,7 +216,7 @@
         }
 
         Bundle extras;
-        if (isForSystemDialer) {
+        if (isForSystemInCallService) {
             extras = call.getExtras();
         } else {
             extras = sanitizeExtras(call.getExtras());
@@ -269,9 +269,9 @@
      *     <li>Caller number verification status (verstat)</li>
      * </ul>
      * All other fields are nulled or set to 0 values.
-     * Where the call screening service is part of the system dialer, the
+     * Where the call screening service is part of the system incallservice, the
      * {@link Connection#EXTRA_SIP_INVITE} header information is also sent to the call screening
-     * service (since the system dialer has access to this anyways).
+     * service (since the system incallservice has access to this anyways).
      * @param call The telecom call to send to a call screening service.
      * @param areRestrictedExtrasIncluded {@code true} if the set of restricted extras defined in
      *                                    {@link #RESTRICTED_CALL_SCREENING_EXTRA_KEYS} are to
@@ -333,7 +333,7 @@
 
     /**
      * Sanitize the extras bundle passed in, removing keys which should not be sent to non-system
-     * dialer apps.
+     * incallservice apps.
      * @param oldExtras Extras bundle to sanitize.
      * @return The sanitized extras bundle.
      */
diff --git a/src/com/android/server/telecom/PhoneAccountRegistrar.java b/src/com/android/server/telecom/PhoneAccountRegistrar.java
index ef2840a..e9ddfa0 100644
--- a/src/com/android/server/telecom/PhoneAccountRegistrar.java
+++ b/src/com/android/server/telecom/PhoneAccountRegistrar.java
@@ -18,6 +18,7 @@
 
 import android.Manifest;
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -485,6 +486,7 @@
      * target phone account.
      * @return phone account handle of sim call manager based on the ongoing call.
      */
+    @Nullable
     public PhoneAccountHandle getSimCallManagerFromCall(Call call) {
         if (call == null) {
             return null;
@@ -1597,10 +1599,16 @@
             return BitmapFactory.decodeByteArray(imageByteArray, 0, imageByteArray.length);
         }
 
+        @Nullable
         protected Icon readIcon(XmlPullParser parser) throws IOException {
-            byte[] iconByteArray = Base64.decode(parser.getText(), 0);
-            ByteArrayInputStream stream = new ByteArrayInputStream(iconByteArray);
-            return Icon.createFromStream(stream);
+            try {
+                byte[] iconByteArray = Base64.decode(parser.getText(), 0);
+                ByteArrayInputStream stream = new ByteArrayInputStream(iconByteArray);
+                return Icon.createFromStream(stream);
+            } catch (IllegalArgumentException e) {
+                Log.e(this, e, "Bitmap must not be null.");
+                return null;
+            }
         }
     }
 
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index 0cdb8bc..11ddbc3 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -43,6 +43,7 @@
 import android.os.Bundle;
 import android.os.Process;
 import android.os.UserHandle;
+import android.provider.BlockedNumberContract;
 import android.provider.Settings;
 import android.telecom.Log;
 import android.telecom.PhoneAccount;
@@ -709,7 +710,7 @@
         public ComponentName getDefaultPhoneApp() {
             try {
                 Log.startSession("TSI.gDPA");
-                return mDefaultDialerCache.getSystemDialerComponent();
+                return mDefaultDialerCache.getDialtactsSystemDialerComponent();
             } finally {
                 Log.endSession();
             }
@@ -1493,6 +1494,28 @@
         }
 
         @Override
+        public void stopBlockSuppression() {
+            try {
+                Log.startSession("TSI.sBS");
+                enforceModifyPermission();
+                if (Binder.getCallingUid() != Process.SHELL_UID
+                        && Binder.getCallingUid() != Process.ROOT_UID) {
+                    throw new SecurityException("Shell-only API.");
+                }
+                synchronized (mLock) {
+                    long token = Binder.clearCallingIdentity();
+                    try {
+                        BlockedNumberContract.SystemContract.endBlockSuppression(mContext);
+                    } finally {
+                        Binder.restoreCallingIdentity(token);
+                    }
+                }
+            } finally {
+                Log.endSession();
+            }
+        }
+
+        @Override
         public TelecomAnalytics dumpCallAnalytics() {
             try {
                 Log.startSession("TSI.dCA");
diff --git a/src/com/android/server/telecom/settings/BlockedNumbersActivity.java b/src/com/android/server/telecom/settings/BlockedNumbersActivity.java
index 3549db5..1fe7c5f 100644
--- a/src/com/android/server/telecom/settings/BlockedNumbersActivity.java
+++ b/src/com/android/server/telecom/settings/BlockedNumbersActivity.java
@@ -38,6 +38,7 @@
 import android.provider.ContactsContract;
 import android.telephony.PhoneNumberFormattingTextWatcher;
 import android.telephony.PhoneNumberUtils;
+import android.telephony.TelephonyManager;
 import android.text.Editable;
 import android.text.InputType;
 import android.text.TextUtils;
@@ -285,7 +286,7 @@
      * Add blocked number if it does not exist.
      */
     private void addBlockedNumber(String number) {
-        if (PhoneNumberUtils.isEmergencyNumber(number)) {
+        if (isEmergencyNumber(this, number)) {
             Toast.makeText(
                     this,
                     getString(R.string.blocked_numbers_block_emergency_number_message),
@@ -298,6 +299,16 @@
         }
     }
 
+    private boolean isEmergencyNumber(Context context, String number) {
+        try {
+            TelephonyManager tm = (TelephonyManager) context.getSystemService(
+                    Context.TELEPHONY_SERVICE);
+            return tm.isEmergencyNumber(number);
+        } catch (IllegalStateException ise) {
+            return false;
+        }
+    }
+
     @Override
     public void beforeTextChanged(CharSequence s, int start, int count, int after) {
         // no-op
diff --git a/testapps/AndroidManifest.xml b/testapps/AndroidManifest.xml
index 4238191..9c461ca 100644
--- a/testapps/AndroidManifest.xml
+++ b/testapps/AndroidManifest.xml
@@ -15,40 +15,41 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          coreApp="true"
-          package="com.android.server.telecom.testapps">
+     coreApp="true"
+     package="com.android.server.telecom.testapps">
 
-    <uses-sdk
-        android:minSdkVersion="28"
-        android:targetSdkVersion="30" />
+    <uses-sdk android:minSdkVersion="28"
+         android:targetSdkVersion="30"/>
 
-    <uses-permission android:name="android.permission.ACCEPT_HANDOVER" />
-    <uses-permission android:name="android.permission.BLUETOOTH" />
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.CALL_PHONE" />
-    <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
-    <uses-permission android:name="android.permission.READ_CALL_LOG" />
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-    <uses-permission android:name="android.permission.REGISTER_CALL_PROVIDER" />
-    <uses-permission android:name="android.permission.REGISTER_CONNECTION_MANAGER" />
-    <uses-permission android:name="android.permission.REGISTER_SIM_SUBSCRIPTION" />
-    <uses-permission android:name="android.permission.WRITE_CALL_LOG" />
+    <uses-permission android:name="android.permission.ACCEPT_HANDOVER"/>
+    <uses-permission android:name="android.permission.BLUETOOTH"/>
+    <uses-permission android:name="android.permission.CAMERA"/>
+    <uses-permission android:name="android.permission.CALL_PHONE"/>
+    <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <uses-permission android:name="android.permission.MANAGE_OWN_CALLS"/>
+    <uses-permission android:name="android.permission.READ_CALL_LOG"/>
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+    <uses-permission android:name="android.permission.REGISTER_CALL_PROVIDER"/>
+    <uses-permission android:name="android.permission.REGISTER_CONNECTION_MANAGER"/>
+    <uses-permission android:name="android.permission.REGISTER_SIM_SUBSCRIPTION"/>
+    <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
 
     <application android:label="@string/app_name">
-        <uses-library android:name="android.test.runner" />
+        <uses-library android:name="android.test.runner"/>
 
         <!-- Miscellaneous telecom app-related test activities. -->
 
         <service android:name="com.android.server.telecom.testapps.TestConnectionService"
-                 android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" >
+             android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.telecom.ConnectionService" />
+                <action android:name="android.telecom.ConnectionService"/>
             </intent-filter>
         </service>
 
-        <receiver android:name=".TestConnectionServiceReceiver">
+        <receiver android:name=".TestConnectionServiceReceiver"
+             android:exported="true">
             <intent-filter>
                 <action android:name="android.server.telecom.testapps.ACTION_SWITCH_PHONE_ACCOUNT"/>
                 <action android:name="android.server.telecom.testapps.ACTION_SWITCH_PHONE_ACCOUNT_WRONG"/>
@@ -56,23 +57,27 @@
         </receiver>
 
         <service android:name="com.android.server.telecom.testapps.TestConnectionManager"
-                 android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" >
+             android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.telecom.ConnectionService" />
+                <action android:name="android.telecom.ConnectionService"/>
             </intent-filter>
         </service>
 
         <service android:name="com.android.server.telecom.testapps.TestInCallServiceImpl"
-                 android:process="com.android.server.telecom.testapps.TestInCallService"
-                 android:permission="android.permission.BIND_INCALL_SERVICE" >
-            <meta-data android:name="android.telecom.IN_CALL_SERVICE_UI" android:value="true"/>
+             android:process="com.android.server.telecom.testapps.TestInCallService"
+             android:permission="android.permission.BIND_INCALL_SERVICE"
+             android:exported="true">
+            <meta-data android:name="android.telecom.IN_CALL_SERVICE_UI"
+                 android:value="true"/>
             <intent-filter>
                 <action android:name="android.telecom.InCallService"/>
             </intent-filter>
         </service>
 
         <receiver android:name="com.android.server.telecom.testapps.TestInCallServiceBroadcastReceiver"
-                 android:process="com.android.server.telecom.testapps.TestInCallService" >
+             android:process="com.android.server.telecom.testapps.TestInCallService"
+             android:exported="true">
             <intent-filter>
                 <action android:name="android.server.telecom.testapps.ACTION_SEND_UPDATE_REQUEST_FROM_TEST_INCALL_SERVICE"/>
                 <action android:name="android.server.telecom.testapps.ACTION_SEND_UPGRADE_RESPONSE"/>
@@ -84,201 +89,212 @@
 
 
         <activity android:name="com.android.server.telecom.testapps.TestInCallUI"
-                android:process="com.android.server.telecom.testapps.TestInCallService"
-                android:label="@string/inCallUiAppLabel"
-                android:launchMode="singleInstance">
+             android:process="com.android.server.telecom.testapps.TestInCallService"
+             android:label="@string/inCallUiAppLabel"
+             android:launchMode="singleInstance"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
 
         <activity android:name="com.android.server.telecom.testapps.TestRttActivity"
-                  android:process="com.android.server.telecom.testapps.TestInCallService"
-                  android:label="@string/rttUiLabel"
-                  android:launchMode="singleInstance">
+             android:process="com.android.server.telecom.testapps.TestInCallService"
+             android:label="@string/rttUiLabel"
+             android:launchMode="singleInstance"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
         </activity>
 
         <activity android:name="com.android.server.telecom.testapps.TestCallActivity"
-                  android:theme="@android:style/Theme.NoDisplay"
-                  android:label="@string/testCallActivityLabel">
+             android:theme="@android:style/Theme.NoDisplay"
+             android:label="@string/testCallActivityLabel"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.telecom.testapps.ACTION_START_INCOMING_CALL" />
-                <action android:name="android.telecom.testapps.ACTION_NEW_UNKNOWN_CALL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="tel" />
-                <data android:scheme="sip" />
+                <action android:name="android.telecom.testapps.ACTION_START_INCOMING_CALL"/>
+                <action android:name="android.telecom.testapps.ACTION_NEW_UNKNOWN_CALL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="tel"/>
+                <data android:scheme="sip"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.telecom.testapps.ACTION_HANGUP_CALLS" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.telecom.testapps.ACTION_HANGUP_CALLS"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.telecom.testapps.ACTION_SEND_UPGRADE_REQUEST" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="int" />
+                <action android:name="android.telecom.testapps.ACTION_SEND_UPGRADE_REQUEST"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="int"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.telecom.testapps.ACTION_RTT_CALL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:scheme="tel" />
+                <action android:name="android.telecom.testapps.ACTION_RTT_CALL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <data android:scheme="tel"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.telecom.testapps.ACTION_REMOTE_RTT_UPGRADE" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.telecom.testapps.ACTION_REMOTE_RTT_UPGRADE"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
         </activity>
 
         <receiver android:name="com.android.server.telecom.testapps.CallNotificationReceiver"
-                  android:exported="false">
+             android:exported="false">
             <intent-filter>
-                <action android:name="com.android.server.telecom.testapps.ACTION_CALL_SERVICE_EXIT" />
+                <action android:name="com.android.server.telecom.testapps.ACTION_CALL_SERVICE_EXIT"/>
             </intent-filter>
         </receiver>
 
         <activity android:name="com.android.server.telecom.testapps.TestDialerActivity"
-                  android:label="@string/testDialerActivityLabel"
-                  android:process="com.android.server.telecom.testapps.TestInCallService">
+             android:label="@string/testDialerActivityLabel"
+             android:process="com.android.server.telecom.testapps.TestInCallService"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.DIAL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:mimeType="vnd.android.cursor.item/phone" />
-                <data android:mimeType="vnd.android.cursor.item/person" />
+                <action android:name="android.intent.action.DIAL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.BROWSABLE"/>
+                <data android:mimeType="vnd.android.cursor.item/phone"/>
+                <data android:mimeType="vnd.android.cursor.item/person"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.DIAL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:scheme="voicemail" />
+                <action android:name="android.intent.action.DIAL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.BROWSABLE"/>
+                <data android:scheme="voicemail"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.DIAL" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.intent.action.DIAL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.VIEW" />
-                <action android:name="android.intent.action.DIAL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:scheme="tel" />
+                <action android:name="android.intent.action.VIEW"/>
+                <action android:name="android.intent.action.DIAL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.BROWSABLE"/>
+                <data android:scheme="tel"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
 
         <activity android:name="com.android.server.telecom.testapps.TestUssdActivity"
-                android:label="@string/UssdUiAppLabel"
-                android:launchMode="singleInstance">
+             android:label="@string/UssdUiAppLabel"
+             android:launchMode="singleInstance"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
           </activity>
 
         <activity android:name="com.android.server.telecom.testapps.TestCertActivity"
-                android:label="@string/KeyUiAppLabel"
-                android:launchMode="singleInstance">
+             android:label="@string/KeyUiAppLabel"
+             android:launchMode="singleInstance"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
           </activity>
 
         <activity android:name="com.android.server.telecom.testapps.SelfManagedCallingActivity"
-                  android:label="@string/selfManagedCallingActivityLabel"
-                  android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"
-                  android:theme="@android:style/Theme.Material.Light">
+             android:label="@string/selfManagedCallingActivityLabel"
+             android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"
+             android:theme="@android:style/Theme.Material.Light"
+             android:exported="true">
           <intent-filter>
-              <action android:name="android.intent.action.MAIN" />
-              <category android:name="android.intent.category.DEFAULT" />
-              <category android:name="android.intent.category.LAUNCHER" />
+              <action android:name="android.intent.action.MAIN"/>
+              <category android:name="android.intent.category.DEFAULT"/>
+              <category android:name="android.intent.category.LAUNCHER"/>
           </intent-filter>
         </activity>
 
         <activity android:name="com.android.server.telecom.testapps.IncomingSelfManagedCallActivity"
-                  android:label="@string/selfManagedCallingActivityLabel"
-                  android:process="com.android.server.telecom.testapps.SelfMangingCallingApp">
+             android:label="@string/selfManagedCallingActivityLabel"
+             android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"
+             android:exported="true">
           <intent-filter>
-              <action android:name="android.intent.action.MAIN" />
+              <action android:name="android.intent.action.MAIN"/>
           </intent-filter>
         </activity>
 
         <activity android:name="com.android.server.telecom.testapps.HandoverActivity"
-                  android:label="@string/selfManagedCallingActivityLabel"
-                  android:process="com.android.server.telecom.testapps.SelfMangingCallingApp">
+             android:label="@string/selfManagedCallingActivityLabel"
+             android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"
+             android:exported="true">
           <intent-filter>
-              <action android:name="android.intent.action.MAIN" />
+              <action android:name="android.intent.action.MAIN"/>
           </intent-filter>
         </activity>
 
         <service android:name="com.android.server.telecom.testapps.SelfManagedConnectionService"
-                 android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
-                 android:process="com.android.server.telecom.testapps.SelfMangingCallingApp">
+             android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
+             android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"
+             android:exported="true">
           <intent-filter>
-              <action android:name="android.telecom.ConnectionService" />
+              <action android:name="android.telecom.ConnectionService"/>
           </intent-filter>
         </service>
 
         <receiver android:exported="false"
-            android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"
-            android:name="com.android.server.telecom.testapps.SelfManagedCallNotificationReceiver" />
+             android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"
+             android:name="com.android.server.telecom.testapps.SelfManagedCallNotificationReceiver"/>
 
         <receiver android:exported="true"
-                  android:name="com.android.server.telecom.testapps.NuisanceReportReceiver">
+             android:name="com.android.server.telecom.testapps.NuisanceReportReceiver">
             <intent-filter>
-                <action android:name="android.telecom.action.NUISANCE_CALL_STATUS_CHANGED" />
+                <action android:name="android.telecom.action.NUISANCE_CALL_STATUS_CHANGED"/>
             </intent-filter>
         </receiver>
 
-        <service
-            android:name=".TestCallScreeningService"
-            android:permission="android.permission.BIND_SCREENING_SERVICE">
+        <service android:name=".TestCallScreeningService"
+             android:permission="android.permission.BIND_SCREENING_SERVICE"
+             android:exported="true">
             <intent-filter>
                 <action android:name="android.telecom.CallScreeningService"/>
             </intent-filter>
         </service>
 
         <activity android:name=".CallScreeningActivity"
-                  android:configChanges="orientation|screenSize|keyboardHidden"
-                  android:excludeFromRecents="true"
-                  android:launchMode="singleInstance">
+             android:configChanges="orientation|screenSize|keyboardHidden"
+             android:excludeFromRecents="true"
+             android:launchMode="singleInstance">
         </activity>
 
-        <service
-                android:name=".TestCallRedirectionService"
-                android:permission="android.permission.BIND_CALL_REDIRECTION_SERVICE">
+        <service android:name=".TestCallRedirectionService"
+             android:permission="android.permission.BIND_CALL_REDIRECTION_SERVICE"
+             android:exported="true">
             <intent-filter>
                 <action android:name="android.telecom.CallRedirectionService"/>
             </intent-filter>
         </service>
 
         <activity android:name=".CallRedirectionActivity"
-                  android:configChanges="orientation|screenSize|keyboardHidden"
-                  android:excludeFromRecents="true"
-                  android:launchMode="singleInstance">
+             android:configChanges="orientation|screenSize|keyboardHidden"
+             android:excludeFromRecents="true"
+             android:launchMode="singleInstance">
         </activity>
 
         <activity android:name=".PostCallActivity"
-                  android:label="@string/postCallActivityLabel">
+             android:label="@string/postCallActivityLabel"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.telecom.action.POST_CALL" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.telecom.action.POST_CALL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
         </activity>
     </application>
diff --git a/testapps/carmodedialer/AndroidManifest.xml b/testapps/carmodedialer/AndroidManifest.xml
index 7f55f7e..f237211 100644
--- a/testapps/carmodedialer/AndroidManifest.xml
+++ b/testapps/carmodedialer/AndroidManifest.xml
@@ -15,75 +15,77 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          coreApp="true"
-          package="com.android.server.telecom.carmodedialer">
+     coreApp="true"
+     package="com.android.server.telecom.carmodedialer">
 
-    <uses-sdk
-        android:minSdkVersion="28"
-        android:targetSdkVersion="29" />
+    <uses-sdk android:minSdkVersion="28"
+         android:targetSdkVersion="29"/>
 
-    <uses-permission android:name="android.permission.ACCEPT_HANDOVER" />
-    <uses-permission android:name="android.permission.BLUETOOTH" />
-    <uses-permission android:name="android.permission.CALL_PHONE" />
-    <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE" />
-    <uses-permission android:name="android.permission.ENTER_CAR_MODE_PRIORITIZED" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.READ_CALL_LOG" />
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-    <uses-permission android:name="android.permission.WRITE_CALL_LOG" />
+    <uses-permission android:name="android.permission.ACCEPT_HANDOVER"/>
+    <uses-permission android:name="android.permission.BLUETOOTH"/>
+    <uses-permission android:name="android.permission.CALL_PHONE"/>
+    <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
+    <uses-permission android:name="android.permission.ENTER_CAR_MODE_PRIORITIZED"/>
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <uses-permission android:name="android.permission.READ_CALL_LOG"/>
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+    <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
 
     <application android:label="Telecom CarMode">
-        <uses-library android:name="android.test.runner" />
+        <uses-library android:name="android.test.runner"/>
 
         <service android:name="com.android.server.telecom.carmodedialer.CarModeInCallServiceImpl"
-                 android:permission="android.permission.BIND_INCALL_SERVICE" >
+             android:permission="android.permission.BIND_INCALL_SERVICE"
+             android:exported="true">
           <meta-data android:name="android.telecom.IN_CALL_SERVICE_CAR_MODE_UI"
-                     android:value="true"/>
+               android:value="true"/>
           <intent-filter>
               <action android:name="android.telecom.InCallService"/>
           </intent-filter>
         </service>
 
         <activity android:name="com.android.server.telecom.carmodedialer.CarModeInCallUI"
-                android:label="CarMode Dialer"
-                android:launchMode="singleInstance">
+             android:label="CarMode Dialer"
+             android:launchMode="singleInstance"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
 
         <activity android:name="com.android.server.telecom.carmodedialer.CarModeDialerActivity"
-                  android:label="CarMode Dialer">
+             android:label="CarMode Dialer"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.DIAL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:mimeType="vnd.android.cursor.item/phone" />
-                <data android:mimeType="vnd.android.cursor.item/person" />
+                <action android:name="android.intent.action.DIAL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.BROWSABLE"/>
+                <data android:mimeType="vnd.android.cursor.item/phone"/>
+                <data android:mimeType="vnd.android.cursor.item/person"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.DIAL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:scheme="voicemail" />
+                <action android:name="android.intent.action.DIAL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.BROWSABLE"/>
+                <data android:scheme="voicemail"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.DIAL" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.intent.action.DIAL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.VIEW" />
-                <action android:name="android.intent.action.DIAL" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:scheme="tel" />
+                <action android:name="android.intent.action.VIEW"/>
+                <action android:name="android.intent.action.DIAL"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.BROWSABLE"/>
+                <data android:scheme="tel"/>
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
     </application>
diff --git a/tests/src/com/android/server/telecom/tests/InCallControllerTests.java b/tests/src/com/android/server/telecom/tests/InCallControllerTests.java
index e16b598..c31761f 100644
--- a/tests/src/com/android/server/telecom/tests/InCallControllerTests.java
+++ b/tests/src/com/android/server/telecom/tests/InCallControllerTests.java
@@ -291,7 +291,8 @@
         ArgumentCaptor<Intent> queryIntentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mMockPackageManager, times(4)).queryIntentServicesAsUser(
                 queryIntentCaptor.capture(),
-                eq(PackageManager.GET_META_DATA), eq(CURRENT_USER_ID));
+                eq(PackageManager.GET_META_DATA | PackageManager.MATCH_DISABLED_COMPONENTS),
+                eq(CURRENT_USER_ID));
 
         // Verify call for default dialer InCallService
         assertEquals(DEF_PKG, queryIntentCaptor.getAllValues().get(0).getPackage());
@@ -350,7 +351,8 @@
         ArgumentCaptor<Intent> queryIntentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mMockPackageManager, times(4)).queryIntentServicesAsUser(
                 queryIntentCaptor.capture(),
-                eq(PackageManager.GET_META_DATA), eq(CURRENT_USER_ID));
+                eq(PackageManager.GET_META_DATA | PackageManager.MATCH_DISABLED_COMPONENTS),
+                eq(CURRENT_USER_ID));
 
         // Verify call for default dialer InCallService
         assertEquals(DEF_PKG, queryIntentCaptor.getAllValues().get(0).getPackage());
@@ -428,7 +430,8 @@
         ArgumentCaptor<Intent> queryIntentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mMockPackageManager, times(4)).queryIntentServicesAsUser(
                 queryIntentCaptor.capture(),
-                eq(PackageManager.GET_META_DATA), eq(CURRENT_USER_ID));
+                eq(PackageManager.GET_META_DATA | PackageManager.MATCH_DISABLED_COMPONENTS),
+                eq(CURRENT_USER_ID));
 
         // Verify call for default dialer InCallService
         assertEquals(DEF_PKG, queryIntentCaptor.getAllValues().get(0).getPackage());
@@ -510,7 +513,8 @@
         ArgumentCaptor<Intent> queryIntentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mMockPackageManager, times(4)).queryIntentServicesAsUser(
                 queryIntentCaptor.capture(),
-                eq(PackageManager.GET_META_DATA), eq(CURRENT_USER_ID));
+                eq(PackageManager.GET_META_DATA | PackageManager.MATCH_DISABLED_COMPONENTS),
+                eq(CURRENT_USER_ID));
 
         // Verify call for default dialer InCallService
         assertEquals(DEF_PKG, queryIntentCaptor.getAllValues().get(0).getPackage());
@@ -634,7 +638,8 @@
         ArgumentCaptor<Intent> queryIntentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mMockPackageManager, times(4)).queryIntentServicesAsUser(
                 queryIntentCaptor.capture(),
-                eq(PackageManager.GET_META_DATA), eq(CURRENT_USER_ID));
+                eq(PackageManager.GET_META_DATA | PackageManager.MATCH_DISABLED_COMPONENTS),
+                eq(CURRENT_USER_ID));
 
         // Verify call for default dialer InCallService
         assertEquals(DEF_PKG, queryIntentCaptor.getAllValues().get(0).getPackage());
@@ -1038,6 +1043,7 @@
             serviceInfo.applicationInfo = new ApplicationInfo();
             serviceInfo.applicationInfo.uid = DEF_UID;
             serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE;
+            serviceInfo.enabled = true;
             serviceInfo.metaData = new Bundle();
             serviceInfo.metaData.putBoolean(
                     TelecomManager.METADATA_IN_CALL_SERVICE_UI, true);
@@ -1065,6 +1071,7 @@
                 serviceInfo.applicationInfo.uid = CAR2_UID;
             }
             serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE;
+            serviceInfo.enabled = true;
             serviceInfo.metaData = new Bundle();
             serviceInfo.metaData.putBoolean(
                     TelecomManager.METADATA_IN_CALL_SERVICE_CAR_MODE_UI, true);
@@ -1086,6 +1093,7 @@
             serviceInfo.name = SYS_CLASS;
             serviceInfo.applicationInfo = new ApplicationInfo();
             serviceInfo.applicationInfo.uid = SYS_UID;
+            serviceInfo.enabled = true;
             serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE;
         }};
     }
@@ -1097,6 +1105,7 @@
             serviceInfo.name = COMPANION_CLASS;
             serviceInfo.applicationInfo = new ApplicationInfo();
             serviceInfo.applicationInfo.uid = COMPANION_UID;
+            serviceInfo.enabled = true;
             serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE;
         }};
     }
@@ -1149,7 +1158,7 @@
                 return resolveInfo;
             }
         }).when(mMockPackageManager).queryIntentServicesAsUser(
-                any(Intent.class), eq(PackageManager.GET_META_DATA), eq(CURRENT_USER_ID));
+                any(Intent.class), anyInt(), eq(CURRENT_USER_ID));
     }
 
     private void setupMockPackageManagerLocationPermission(final String pkg,
diff --git a/tests/src/com/android/server/telecom/tests/NewOutgoingCallIntentBroadcasterTest.java b/tests/src/com/android/server/telecom/tests/NewOutgoingCallIntentBroadcasterTest.java
index 9470008..a5b78b7 100644
--- a/tests/src/com/android/server/telecom/tests/NewOutgoingCallIntentBroadcasterTest.java
+++ b/tests/src/com/android/server/telecom/tests/NewOutgoingCallIntentBroadcasterTest.java
@@ -229,7 +229,7 @@
         mComponentContextFixture.putResource(R.string.dialer_default_class,
                 dialer_default_class_string);
         when(mDefaultDialerCache.getSystemDialerApplication()).thenReturn(ui_package_string);
-        when(mDefaultDialerCache.getSystemDialerComponent()).thenReturn(
+        when(mDefaultDialerCache.getDialtactsSystemDialerComponent()).thenReturn(
                 new ComponentName(ui_package_string, dialer_default_class_string));
 
         int result = processIntent(intent, false).disconnectCause;