Merge "Rename closeDialog to closeSession as per API change" am: 70f0a23b7f

Original change: https://android-review.googlesource.com/c/platform/packages/services/Telephony/+/1670505

Change-Id: If79337d53ef3aa65ecdc07c1f684edddc143c295
diff --git a/src/com/android/services/telephony/rcs/MessageTransportStateTracker.java b/src/com/android/services/telephony/rcs/MessageTransportStateTracker.java
index c42472d..daafeb2 100644
--- a/src/com/android/services/telephony/rcs/MessageTransportStateTracker.java
+++ b/src/com/android/services/telephony/rcs/MessageTransportStateTracker.java
@@ -190,7 +190,7 @@
          * dialog be released as the SIP dialog is now closed.
          */
         @Override
-        public void closeDialog(String callId) {
+        public void cleanupSession(String callId) {
             long token = Binder.clearCallingIdentity();
             try {
                 mExecutor.execute(() -> {
@@ -202,7 +202,7 @@
                     try {
                         // TODO track the SIP Dialogs created/destroyed on the associated
                         // SipDelegate.
-                        mSipDelegate.closeDialog(callId);
+                        mSipDelegate.cleanupSession(callId);
                     } catch (RemoteException e) {
                         logw("SipDelegate not available when closeDialog was called "
                                 + "for call id: " + callId);
diff --git a/tests/src/com/android/services/telephony/rcs/MessageTransportStateTrackerTest.java b/tests/src/com/android/services/telephony/rcs/MessageTransportStateTrackerTest.java
index 5e05085..f69b9a8 100644
--- a/tests/src/com/android/services/telephony/rcs/MessageTransportStateTrackerTest.java
+++ b/tests/src/com/android/services/telephony/rcs/MessageTransportStateTrackerTest.java
@@ -173,12 +173,12 @@
 
     @SmallTest
     @Test
-    public void testDelegateConnectionCloseDialog() throws Exception {
+    public void testDelegateConnectionCloseSession() throws Exception {
         MessageTransportStateTracker tracker = new MessageTransportStateTracker(TEST_SUB_ID,
                 Runnable::run, mDelegateMessageCallback);
         tracker.openTransport(mISipDelegate, Collections.emptySet());
-        tracker.getDelegateConnection().closeDialog("testCallId");
-        verify(mISipDelegate).closeDialog("testCallId");
+        tracker.getDelegateConnection().cleanupSession("testCallId");
+        verify(mISipDelegate).cleanupSession("testCallId");
     }
 
     @SmallTest