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

Unverified Commit 10d3c867 authored by Quallenauge's avatar Quallenauge Committed by Michael Bestas
Browse files

telephony: Disable handling audio direction changes on IMS calls.

I6f84e2b90e572c0973dcf04ce1e0c8e5e3524467 (AOSP) introduces
handling of changes of the audio direction between major call state
changes.

This breaks ringback tone when establishing IMS calls
on other devices, so make it configurable.

Change-Id: I29331b7e8ea8f048f4567518b2173c6d7e503a6c
parent 832220de
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ import android.os.Registrant;
import android.os.RegistrantList;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.sysprop.TelephonyProperties;
@@ -3072,10 +3073,14 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        if (ignoreState) {
            conn.updateAddressDisplay(imsCall);
            conn.updateExtras(imsCall);
            // Some devices will change the audio direction between major call state changes, so we
            // need to check whether to start or stop ringback
            boolean handleAudioDirectionChangesBetweenCallStateChanges =
                SystemProperties.getBoolean(
                    "ro.telephony.handle_audio_direction_changes_between_call_state_changes", true);
            if (handleAudioDirectionChangesBetweenCallStateChanges) {
                // Some devices will change the audio direction between major call state change,
                // so we need to check whether to start or stop ringback
                conn.maybeChangeRingbackState();

            }
            maybeSetVideoCallProvider(conn, imsCall);
            // IMS call profile might be changed while call state is maintained. In this case, it's
            // required to notify to CallAttributesListener.