Add handleCallIntent method in TelecomManager.

This is an @hide method usable only from within Telecom itself in order to
trampoline an ACTION_CALL intent from the UserCallActivity to
Telecom's system service.

Bug: 116719392
Test: Verify that calls initiated via CALL intent no longer get rebroadcast
and are instead sent directly to Telecom.

Change-Id: Ie765631bef8329a8ed12723d9c037a44b4f80882
This commit is contained in:
Tyler Gunn
2018-09-28 16:16:20 -07:00
parent d7fe73d3b3
commit c37445cb4e
2 changed files with 21 additions and 0 deletions

View File

@@ -1905,6 +1905,22 @@ public class TelecomManager {
return false;
}
/**
* Handles {@link Intent#ACTION_CALL} intents trampolined from UserCallActivity.
* @param intent The {@link Intent#ACTION_CALL} intent to handle.
* @hide
*/
public void handleCallIntent(Intent intent) {
try {
if (isServiceConnected()) {
getTelecomService().handleCallIntent(intent);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException handleCallIntent: " + e);
}
}
private ITelecomService getTelecomService() {
if (mTelecomServiceOverride != null) {
return mTelecomServiceOverride;

View File

@@ -284,4 +284,9 @@ interface ITelecomService {
* @see TelecomServiceImpl#isInEmergencyCall
*/
boolean isInEmergencyCall();
/**
* @see TelecomServiceImpl#handleCallIntent
*/
void handleCallIntent(in Intent intent);
}