@Test public void testDisposeOfTransportClient() { TransportClient transportClient = spy(mTransportClientManager.getTransportClient(mTransportComponent, "caller")); mTransportClientManager.disposeOfTransportClient(transportClient, "caller"); verify(transportClient).unbind(any()); verify(transportClient).markAsDisposed(); }
public void disposeOfTransportClient(TransportClient transportClient, String caller) { transportClient.unbind(caller); transportClient.markAsDisposed(); synchronized (mTransportClientsLock) { TransportUtils.log( Priority.DEBUG, TAG, formatMessage(null, caller, "Disposing of " + transportClient)); mTransportClientsCallerMap.remove(transportClient); } }
TransportClientManager { public void disposeOfTransportClient(TransportClient transportClient, String caller) { transportClient.unbind(caller); transportClient.markAsDisposed(); synchronized (mTransportClientsLock) { TransportUtils.log( Priority.DEBUG, TAG, formatMessage(null, caller, "Disposing of " + transportClient)); mTransportClientsCallerMap.remove(transportClient); } } }
TransportClientManager { public void disposeOfTransportClient(TransportClient transportClient, String caller) { transportClient.unbind(caller); transportClient.markAsDisposed(); synchronized (mTransportClientsLock) { TransportUtils.log( Priority.DEBUG, TAG, formatMessage(null, caller, "Disposing of " + transportClient)); mTransportClientsCallerMap.remove(transportClient); } } TransportClientManager(Context context, TransportStats transportStats); }
TransportClientManager { public void disposeOfTransportClient(TransportClient transportClient, String caller) { transportClient.unbind(caller); transportClient.markAsDisposed(); synchronized (mTransportClientsLock) { TransportUtils.log( Priority.DEBUG, TAG, formatMessage(null, caller, "Disposing of " + transportClient)); mTransportClientsCallerMap.remove(transportClient); } } TransportClientManager(Context context, TransportStats transportStats); TransportClient getTransportClient(ComponentName transportComponent, String caller); TransportClient getTransportClient(
            ComponentName transportComponent, Bundle extras, String caller); void disposeOfTransportClient(TransportClient transportClient, String caller); void dump(PrintWriter pw); }
TransportClientManager { public void disposeOfTransportClient(TransportClient transportClient, String caller) { transportClient.unbind(caller); transportClient.markAsDisposed(); synchronized (mTransportClientsLock) { TransportUtils.log( Priority.DEBUG, TAG, formatMessage(null, caller, "Disposing of " + transportClient)); mTransportClientsCallerMap.remove(transportClient); } } TransportClientManager(Context context, TransportStats transportStats); TransportClient getTransportClient(ComponentName transportComponent, String caller); TransportClient getTransportClient(
            ComponentName transportComponent, Bundle extras, String caller); void disposeOfTransportClient(TransportClient transportClient, String caller); void dump(PrintWriter pw);  }