Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c37445cb authored by Tyler Gunn's avatar Tyler Gunn
Browse files

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
parent d7fe73d3
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -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;
+5 −0
Original line number Diff line number Diff line
@@ -284,4 +284,9 @@ interface ITelecomService {
     * @see TelecomServiceImpl#isInEmergencyCall
     */
    boolean isInEmergencyCall();

    /**
     * @see TelecomServiceImpl#handleCallIntent
     */
    void handleCallIntent(in Intent intent);
}