OSDN Git Service

resolve merge conflicts of 4d75bee to nyc-mr1-dev-plus-aosp
authorBrad Ebinger <breadley@google.com>
Wed, 2 Nov 2016 17:28:54 +0000 (10:28 -0700)
committerBrad Ebinger <breadley@google.com>
Wed, 2 Nov 2016 17:33:27 +0000 (10:33 -0700)
Change-Id: Ib11bb52c9d3826e02089485af93856ba891ad034

1  2 
telecomm/java/android/telecom/RemoteConnectionService.java

@@@ -340,18 -340,13 +349,19 @@@ final class RemoteConnectionService 
          }
  
          @Override
-         public void addExistingConnection(final String callId, ParcelableConnection connection) {
+         public void addExistingConnection(String callId, ParcelableConnection connection,
+                 Session.Info sessionInfo) {
 -            // TODO: add contents of this method
 -            RemoteConnection remoteConnction = new RemoteConnection(callId,
 +            RemoteConnection remoteConnection = new RemoteConnection(callId,
                      mOutgoingConnectionServiceRpc, connection);
 -
 -            mOurConnectionServiceImpl.addRemoteExistingConnection(remoteConnction);
 +            mConnectionById.put(callId, remoteConnection);
 +            remoteConnection.registerCallback(new RemoteConnection.Callback() {
 +                @Override
 +                public void onDestroyed(RemoteConnection connection) {
 +                    mConnectionById.remove(callId);
 +                    maybeDisconnectAdapter();
 +                }
 +            });
 +            mOurConnectionServiceImpl.addRemoteExistingConnection(remoteConnection);
          }
  
          @Override