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

Commit b5261480 authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "Don't use RTT for calls to voicemail" into pi-dev

am: ff1307c4

Change-Id: Ie4333c8a22c24892f122c853df478f356a63b827
parents 70adbd26 ff1307c4
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -1262,8 +1262,13 @@ public class CallsManager extends Call.ListenerBase
                    CallState.CONNECTING,
                    phoneAccountHandle == null ? "no-handle" : phoneAccountHandle.toString());

            if (isRttSettingOn() || (extras != null
                    && extras.getBoolean(TelecomManager.EXTRA_START_CALL_WITH_RTT, false))) {
            boolean isVoicemail = (call.getHandle() != null)
                    && (PhoneAccount.SCHEME_VOICEMAIL.equals(call.getHandle().getScheme())
                    || (accountToUse != null && mPhoneAccountRegistrar.isVoiceMailNumber(
                    accountToUse.getAccountHandle(), call.getHandle().getSchemeSpecificPart())));

            if (!isVoicemail && (isRttSettingOn() || (extras != null
                    && extras.getBoolean(TelecomManager.EXTRA_START_CALL_WITH_RTT, false)))) {
                Log.d(this, "Outgoing call requesting RTT, rtt setting is %b", isRttSettingOn());
                if (accountToUse != null
                        && accountToUse.hasCapabilities(PhoneAccount.CAPABILITY_RTT)) {
@@ -1846,8 +1851,15 @@ public class CallsManager extends Call.ListenerBase
                Log.d("phoneAccountSelected: default to voip mode for call %s", call.getId());
                call.setIsVoipAudioMode(true);
            }
            if (isRttSettingOn() || call.getIntentExtras()
                    .getBoolean(TelecomManager.EXTRA_START_CALL_WITH_RTT, false)) {

            boolean isVoicemail = (call.getHandle() != null)
                    && (PhoneAccount.SCHEME_VOICEMAIL.equals(call.getHandle().getScheme())
                    || (realPhoneAccount != null && mPhoneAccountRegistrar.isVoiceMailNumber(
                    realPhoneAccount.getAccountHandle(),
                    call.getHandle().getSchemeSpecificPart())));

            if (!isVoicemail && (isRttSettingOn() || call.getIntentExtras()
                    .getBoolean(TelecomManager.EXTRA_START_CALL_WITH_RTT, false))) {
                Log.d(this, "Outgoing call after account selection requesting RTT," +
                        " rtt setting is %b", isRttSettingOn());
                if (realPhoneAccount != null