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

Commit 005612a0 authored by Omkar Kolangade's avatar Omkar Kolangade Committed by Tyler Gunn
Browse files

IMS-VT: Set VideoState in Call Connecting State

Set VideoState in Call Connecting State
This will ensure that proper video state is sent at InCallService
start i.e. when binding to InCallService itself thereby giving us
sufficient time for surface creation.

Bug: 27477792
Change-Id: Ia7b76b558c1226359dd24e6d07b8e9d1c692ab93
parent a416e07f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -91,6 +91,10 @@ public class CallIntentProcessor {
            clientExtras.putString(TelecomManager.EXTRA_CALL_SUBJECT, callsubject);
        }

        final int videoState = intent.getIntExtra( TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE,
                VideoProfile.STATE_AUDIO_ONLY);
        clientExtras.putInt(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, videoState);

        final boolean isPrivilegedDialer = intent.getBooleanExtra(KEY_IS_PRIVILEGED_DIALER, false);

        // Send to CallsManager to ensure the InCallUI gets kicked off before the broadcast returns
+5 −0
Original line number Diff line number Diff line
@@ -595,6 +595,11 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
    Call startOutgoingCall(Uri handle, PhoneAccountHandle phoneAccountHandle, Bundle extras) {
        Call call = getNewOutgoingCall(handle);

        if (extras!=null) {
            call.setVideoState(extras.getInt(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE,
                    VideoProfile.STATE_AUDIO_ONLY));
        }

        List<PhoneAccountHandle> accounts =
                mPhoneAccountRegistrar.getCallCapablePhoneAccounts(handle.getScheme(), false);