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

Commit 90e34e32 authored by Ihab Awad's avatar Ihab Awad Committed by Jay Shrauner
Browse files

Fix immutability bug in http://ag/587241

Bug: 18292176
Change-Id: Icf1f717d76f042d9950a1d8cca9def061de1c1b8
parent 76de8982
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1310,14 +1310,18 @@ public abstract class Connection implements IConferenceable {
    }

    private static class FailureSignalingConnection extends Connection {
        private boolean mImmutable = false;
        public FailureSignalingConnection(DisconnectCause disconnectCause) {
            setDisconnected(disconnectCause);
            mImmutable = true;
        }

        public void checkImmutable() {
            if (mImmutable) {
                throw new UnsupportedOperationException("Connection is immutable");
            }
        }
    }

    /**
     * Return a {@code Connection} which represents a failed connection attempt. The returned