From 81ea3ffa5030f1b380f8f79a4aba03a7f506f60c Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Fri, 6 Mar 2020 11:36:21 -0800 Subject: [PATCH] Fix Telecom ConnectionTest. A recent Telephony change was made to support missed calls reported over SMS; this change made FailureSignalingConnection fully mutable which failed some CTS. Given that its only the setAddress method which would fail the mutability check, re-added immutability in the FailureSignalingConnection since ultimately we do want to protect these from state changes, but removed the mutability check in the setAddress method since its reasonable to want to report an address in this case. Test: cts-tradefed run cts-dev -m CtsTelecomTestCases -t android.telecom.cts.ConnectionTest Fixes: 150811816 Change-Id: I7f37daf9ac65ff70eec7692410fa299cb30fdc38 --- telecomm/java/android/telecom/Connection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 5f33a3d6f1de8..9dfa3ac7a5d88 100755 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -2331,7 +2331,6 @@ public abstract class Connection extends Conferenceable { * See {@link TelecomManager} for valid values. */ public final void setAddress(Uri address, int presentation) { - checkImmutable(); Log.d(this, "setAddress %s", address); mAddress = address; mAddressPresentation = presentation; @@ -3358,6 +3357,7 @@ public abstract class Connection extends Conferenceable { private boolean mImmutable = false; public FailureSignalingConnection(DisconnectCause disconnectCause) { setDisconnected(disconnectCause); + mImmutable = true; } public void checkImmutable() {