am 8ea0d19f: am 93b42924: Merge "Fix immutability bug in http://ag/587241" into lmp-mr1-dev

* commit '8ea0d19fe2522ceaf5f09808b7835deb9e53c88a':
  Fix immutability bug in http://ag/587241
This commit is contained in:
Ihab Awad
2014-12-02 01:19:31 +00:00
committed by Android Git Automerger

View File

@@ -1310,14 +1310,18 @@ public abstract class Connection implements IConferenceable {
} }
private static class FailureSignalingConnection extends Connection { private static class FailureSignalingConnection extends Connection {
private boolean mImmutable = false;
public FailureSignalingConnection(DisconnectCause disconnectCause) { public FailureSignalingConnection(DisconnectCause disconnectCause) {
setDisconnected(disconnectCause); setDisconnected(disconnectCause);
mImmutable = true;
} }
public void checkImmutable() { public void checkImmutable() {
if (mImmutable) {
throw new UnsupportedOperationException("Connection is immutable"); throw new UnsupportedOperationException("Connection is immutable");
} }
} }
}
/** /**
* Return a {@code Connection} which represents a failed connection attempt. The returned * Return a {@code Connection} which represents a failed connection attempt. The returned