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

Commit 93b42924 authored by Ihab Awad's avatar Ihab Awad Committed by Android (Google) Code Review
Browse files

Merge "Fix immutability bug in http://ag/587241" into lmp-mr1-dev

parents 4cd577f0 90e34e32
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