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

Commit d7d4990d authored by joonhunshin's avatar joonhunshin
Browse files

Fix media type of accepting call when answering via MMI code

Bug: 286499659
Test: atest ImsPhoneTest
Change-Id: Ic06c3c70353862cadeaa1a3d3c7dee49a2e6ccb3
parent b08868ba
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.