code: @Override
    public void removeListener(LifecycleListener listener)
    {
      synchronized(_lock)
      {
        if(_listeners != null && _listeners.contains(listener))
        {
          Set<LifecycleListener> listeners = new HashSet<LifecycleListener>(_listeners);
          listeners.remove(listener);
  
          // no more listeners... stopping the dispatcher
          if(listeners.size() == 0)
          {
            listeners = null;
            
            if(_stateChangeDispatcher != null)
            {
              _stateChangeDispatcher.end();
              _stateChangeDispatcher = null;
            }
          }
  
          if(listeners == null)
            _listeners = null;
          else
            _listeners = Collections.unmodifiableSet(listeners);
        }
  
      }
    }
docs: Removes a listener previously set with {@link #registerListener(LifecycleListener)}
  
  @param listener