protected void dontNotifyAnyRequestListenersInternal ( ) { lockSendRequestsToService . lock ( ) ; try { if ( spiceService == null ) { return ; } synchronized ( mapRequestToLaunchToRequestListener ) { if ( ! mapRequestToLaunchToRequestListener . isEmpty ( ) ) { for ( final CachedSpiceRequest < ? > cachedSpiceRequest : mapRequestToLaunchToRequestListener . keySet ( ) ) { final Set < RequestListener < ? > > setRequestListeners = mapRequestToLaunchToRequestListener . get ( cachedSpiceRequest ) ; if ( setRequestListeners != null ) { Ln . d ( "Removing listeners of request to launch : " + cachedSpiceRequest . toString ( ) + " : " + setRequestListeners . size ( ) ) ; spiceService . dontNotifyRequestListenersForRequest ( cachedSpiceRequest , setRequestListeners ) ; } } } mapRequestToLaunchToRequestListener . clear ( ) ; } Ln . v ( "Cleared listeners of all requests to launch" ) ; removeListenersOfAllPendingCachedRequests ( ) ; } catch ( final InterruptedException e ) { Ln . e ( e , "Interrupted while removing listeners." ) ; } finally { lockSendRequestsToService . unlock ( ) ; } }
Remove all listeners of requests . All requests that have not been yet passed to the service will see their of listeners cleaned . For all requests that have been passed to the service we ask the service to remove their listeners .