Unregister a registered listener.

@param context  context used to unregister the listener.
@param listener listener to unregister.
505309
public static void unregisterListener(Context context, PlaybackListener listener) {
        LocalBroadcastManager.getInstance(context.getApplicationContext())
                .unregisterReceiver(listener);
    }
273972
public static void unregisterProgressListener(@NonNull final Context context, @NonNull final DfuProgressListener listener) {
		if (mProgressBroadcastReceiver != null) {
			final boolean empty = mProgressBroadcastReceiver.removeProgressListener(listener);

			if (empty) {
				LocalBroadcastManager.getInstance(context).unregisterReceiver(mProgressBroadcastReceiver);
				mProgressBroadcastReceiver = null;
			}
		}
	}
1270055
public static <E extends Event> void unsubscribe(Class<E> event, final Listener<E> listener) {
        getEventBus().unsubscribe(event, listener);
    }
301769
public static void register(ActivityListener activityListener, Context context) {
    ListenableActivity activity = getListenableActivity(context);
    if (activity != null) {
      Listener listener = new Listener(activityListener);
      activity.addActivityListener(listener);
    }
  }
494147
public void removeListener(final StatusListener listener) {
        closeSilently(listener);
        listenersLock.writeLock().lock();
        try {
            listeners.remove(listener);
            int lowest = Level.toLevel(DEFAULT_STATUS_LEVEL, Level.WARN).intLevel();
            for (final StatusListener statusListener : listeners) {
                final int level = statusListener.getStatusLevel().intLevel();
                if (lowest < level) {
                    lowest = level;
                }
            }
            listenersLevel = lowest;
        } finally {
            listenersLock.writeLock().unlock();
        }
    }
1298299
@Override
    public void unregister(final Context context, final Callback<Void> callback) {
        new AsyncTask<Void, Void, Exception>() {
            @Override
            protected Exception doInBackground(Void... params) {

                try {

                    if ((deviceToken == null) || (deviceToken.trim().equals(""))) {
                        throw new IllegalStateException(DEVICE_ALREADY_UNREGISTERED);
                    }

                    if (instanceId == null) {
                        instanceId = firebaseInstanceIdProvider.get(context);
                    }
                    String token = Tasks.await(instanceId.getInstanceId(), 30, TimeUnit.SECONDS).getToken();

                    FirebaseMessaging firebaseMessaging = firebaseMessagingProvider.get(context);

                    for (String catgory : categories) {
                        firebaseMessaging.unsubscribeFromTopic(catgory);
                    }

                    //Unsubscribe to generic topic
                    firebaseMessaging.unsubscribeFromTopic(variantId);

                    instanceId.deleteInstanceId();

                    HttpProvider provider = httpProviderProvider.get(deviceRegistryURL, TIMEOUT);
                    setPasswordAuthentication(variantId, secret, provider);

                    try {
                        provider.delete(deviceToken);
                        deviceToken = "";
                        removeSavedPostData(context.getApplicationContext());
                        return null;
                    } catch (HttpException ex) {
                        return ex;
                    }

                } catch (Exception ex) {
                    return ex;
                }

            }

            @SuppressWarnings("unchecked")
            @Override
            protected void onPostExecute(Exception result) {
                if (result == null) {
                    callback.onSuccess(null);
                } else {
                    callback.onFailure(result);
                }
            }

        }.execute((Void) null);
    }
1069408
public void removeListener(EnvLoaderListener listener)
  {
    super.removeListener(listener);
    
    ArrayList<EnvLoaderListener> listeners = _listeners;
    
    if (_listeners == null)
      return;

    synchronized (listeners) {
      for (int i = listeners.size() - 1; i >= 0; i--) {
        EnvLoaderListener oldListener = listeners.get(i);

        if (listener == oldListener) {
          listeners.remove(i);
          return;
        }
        else if (oldListener == null) {
          listeners.remove(i);
        }
      }
    }
  }
1122316
public void removeReferenceListener(ReferenceListener listener) {
		final List<ReferenceListener> list = this.listeners;
		if (list != null) {
			synchronized (list) {
				list.remove(listener);
				if (list.isEmpty()) {
					this.listeners = null;
				}
			}
		}
	}
1053657
def unregister_listener(self, listener):
        
        if not isinstance(listener, IEventListener):
            raise TypeError("listener can only be an instance of type IEventListener")
        self._call("unregisterListener",
                     in_p=[listener])
1071110
public Closeable onUnsubscribeChannelEvent(final Consumer<BitfinexStreamSymbol> listener) {
        unsubscribeChannelConsumers.offer(listener);
        return () -> unsubscribeChannelConsumers.remove(listener);
    }
705094
public synchronized void removeEventListener(EventListener listener)
    {
        if (_sessionManager != null)
            _sessionManager.removeEventListener(listener);

        _sessionListeners= LazyList.remove(_sessionListeners, listener);
        _requestListeners= LazyList.remove(_requestListeners, listener);
        _requestAttributeListeners= LazyList.remove(_requestAttributeListeners, listener);
        _contextAttributeListeners= LazyList.remove(_contextAttributeListeners, listener);
        super.removeEventListener(listener);
    }
1288007
public void removeListener(BaseListener listener, boolean bFreeFlag)
    {
        if (m_nextListener != null)
        {
            if (m_nextListener == listener)
            {
                m_nextListener = listener.getNextListener();
                listener.unlink(bFreeFlag);   // remove theBehavior from the linked list
            }
            else
                m_nextListener.removeListener(listener, bFreeFlag);
        } // Remember to free the listener after removing it!
    }
430707
public void removeListener(HttpListener listener)
    {
        if (listener==null)
            return;
        
        for (int l=0;l<_listeners.size();l++)
        {
            if (listener.equals(_listeners.get(l)))
            {
                _listeners.remove(l);
                removeComponent(listener);
                if (listener.isStarted())
                    try{listener.stop();}catch(InterruptedException e){log.warn(LogSupport.EXCEPTION,e);}
                listener.setHttpServer(null);
            }
        }
    }
577775
public void removeListener(RunListener listener) {
        if (listener == null) {
            throw new NullPointerException("Cannot remove a null listener");
        }
        listeners.remove(wrapIfNotThreadSafe(listener));
    }
918477
def remove_listener(registry, listener):
    
    if listener is not None and listener in registry:
        registry.remove(listener)
        return True

    return False
453162
@RequiresPermission(Manifest.permission.ACCESS_NETWORK_STATE)
    public static void register(@NonNull Context context, @NonNull ConnectivityListener listener) {
        if (receiversMap.containsKey(listener)) {
            throw new RuntimeException("Connectivity listener " + listener
                    + " is already registered");
        }

        final ConnectivityReceiver receiver = new ConnectivityReceiver(listener);
        receiversMap.put(listener, receiver);
        context.registerReceiver(receiver,
                new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
        receiver.notify(isConnected(context));
    }
356187
protected void deactivate(ComponentContext context) {
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "deactivate", name);

        lock.writeLock().lock();
        try {
            if (pmMBean != null) {
                pmMBean.unregister();
                pmMBean = null;
            }
            pm = null;
            properties = null;
        } finally {
            lock.writeLock().unlock();
        }

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "deactivate");
    }