Add Telecom command for setting connectionservice filter
For testing we need the emergency call to go through the CTS
ConnectionService. This is achieved by passing in a package
name filter for testing, which restricts which ConnectionServices
are available for emergency calling.
For safety this filter will be bypassed if the user calls an
actual emergency number (instead of a test number).
Bug: 138741228
Test: atest CtsTelecomTestCases
Change-Id: I656533e4a36a7bba48625bf6f763731991695aed
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 6409203..12066c4 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -2059,12 +2059,13 @@
/**
* Handles {@link Intent#ACTION_CALL} intents trampolined from UserCallActivity.
* @param intent The {@link Intent#ACTION_CALL} intent to handle.
+ * @param callingPackageProxy The original package that called this before it was trampolined.
* @hide
*/
- public void handleCallIntent(Intent intent) {
+ public void handleCallIntent(Intent intent, String callingPackageProxy) {
try {
if (isServiceConnected()) {
- getTelecomService().handleCallIntent(intent);
+ getTelecomService().handleCallIntent(intent, callingPackageProxy);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException handleCallIntent: " + e);