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

Commit 7580ee7c authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "Remove onCallInitiating/Progressing order exceptions." into sc-dev

parents 1325500a 2ad7aaed
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -2892,21 +2892,9 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
     */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    private ImsCall.Listener mImsCallListener = new ImsCall.Listener() {
        boolean mOnCallInitiatingCalled = false;
        boolean mOnCallProgressingCalled = false;

        @Override
        public void onCallInitiating(ImsCall imsCall) {
            if (DBG) log("onCallInitiating");

            if (mOnCallInitiatingCalled) {
                throw new IllegalStateException("onCallInitiating cannot be called twice.");
            } else if (mOnCallProgressingCalled) {
                throw new IllegalStateException("onCallInitiating cannot be called after "
                        + "onCallProgressing has been called.");
            }
            mOnCallInitiatingCalled = true;

            mPendingMO = null;
            processCallStateChange(imsCall, ImsPhoneCall.State.DIALING,
                    DisconnectCause.NOT_DISCONNECTED, true);
@@ -2917,8 +2905,6 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        public void onCallProgressing(ImsCall imsCall) {
            if (DBG) log("onCallProgressing");

            mOnCallProgressingCalled = true;

            mPendingMO = null;
            processCallStateChange(imsCall, ImsPhoneCall.State.ALERTING,
                    DisconnectCause.NOT_DISCONNECTED);