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

Commit ff623d8f authored by Joonhun Shin's avatar Joonhun Shin Committed by Android (Google) Code Review
Browse files

Merge "Fix media type of accepting call when answering via MMI code" into main

parents f00bca44 d7d4990d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ import android.os.ResultReceiver;
import android.os.UserHandle;
import android.preference.PreferenceManager;
import android.sysprop.TelephonyProperties;
import android.telecom.VideoProfile;
import android.telephony.AccessNetworkConstants;
import android.telephony.CarrierConfigManager;
import android.telephony.NetworkRegistrationInfo;
@@ -802,7 +803,11 @@ public class ImsPhone extends ImsPhoneBase {
            try {
                if (getRingingCall().getState() != ImsPhoneCall.State.IDLE) {
                    if (DBG) logd("MmiCode 2: accept ringing call");
                    if (mFeatureFlags.answerAudioOnlyWhenAnsweringViaMmiCode()) {
                        mCT.acceptCall(VideoProfile.STATE_AUDIO_ONLY);
                    } else {
                        mCT.acceptCall(ImsCallProfile.CALL_TYPE_VOICE);
                    }
                } else if (getBackgroundCall().getState() == ImsPhoneCall.State.HOLDING) {
                    // If there's an active ongoing call as well, hold it and the background one
                    // should automatically unhold. Otherwise just unhold the background call.