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

Unverified Commit e5f9b7f6 authored by Quallenauge's avatar Quallenauge Committed by derfelot
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 eecd4f2d
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -49,6 +49,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;
@@ -2757,10 +2758,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);
            return;
        }