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

Commit 5fdb7e8c authored by Ashish Jain's avatar Ashish Jain Committed by Ricardo Cerqueira
Browse files

audio: Inform audio HAL if it is a voice call initiated by Telephony

setMode() API with IN_CALL mode can be called by any of the Apps.
In HAL, it is required to distinguish if it is a real voice call
or not. Inform to audio HAL if it is a voice call by checking
getPhonestate() updated by telephony.

Change-Id: I20a661f49f6566bdd1e23d6de18b509e2728ef19
parent d9303cac
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1960,6 +1960,10 @@ public class AudioService extends IAudioService.Stub {
            if (mode == AudioSystem.MODE_CURRENT) {
                mode = mMode;
            }

            if ((mode == AudioSystem.MODE_IN_CALL) && isInCommunication()) {
                 AudioSystem.setParameters("in_call=true");
            }
            newModeOwnerPid = setModeInt(mode, cb, Binder.getCallingPid());
        }
        // when entering RINGTONE, IN_CALL or IN_COMMUNICATION mode, clear all