Removes a given activity from the activity stack

@param activity the activity to remove
184835
private void removeActivityFromStack(Activity activity){

		Iterator<WeakReference<Activity>> activityStackIterator = activityStack.iterator();
		while(activityStackIterator.hasNext()){
			Activity activityFromWeakReference = activityStackIterator.next().get();

			if(activityFromWeakReference == null){
				activityStackIterator.remove();
			}

			if(activity != null && activityFromWeakReference != null && activityFromWeakReference.equals(activity)){
				activityStackIterator.remove();
			}
		}
	}
133848
public void remove(final View view) {
        if (view.getParent() instanceof ViewGroup) {
            final ViewGroup parent = (ViewGroup) view.getParent();
            if (durationSet) {
                view.animate().setDuration(duration);
            }
            view.animate().alpha(0f).setListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationEnd(Animator animation) {
                    parent.removeView(view);
                    view.setAlpha(1);
                    view.animate().setListener(null);
                }
            });
        }
    }
619512
public void removeConnectionEventListener(
            final ConnectionEventListener listener) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "removeConnectionEventListener", listener);
        }

        _eventListeners.remove(listener);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "removeConnectionEventListener");
        }

    }
255254
@Override
	public void delete(Object entity) {
		if (entity == null) {
			throw new IllegalArgumentException("'entity' must not be [" + entity + "]");
		}
		
		if (operation != Log.Operation.GET) {
			throw new IllegalStateException("Log [" + operation + "] -> ["
					+ Log.Operation.DELETE
					+ "] is not allowed: previous operation must be ["
					+ Log.Operation.GET + "]");
		}
		
		operation = Log.Operation.DELETE;
	}
1256938
public void removeOverride(String operation) {
        if (this.overrideOnce.containsKey(operation) == true) {
            this.overrideOnce.remove(operation);
        }

        if (this.override.containsKey(operation) == true) {
            this.override.remove(operation);
        }
    }
454581
function deleteActivity(_ref10, _ref11) {
    var state = _ref10.state,
        commit = _ref10.commit,
        rootState = _ref10.rootState;

    var _ref12 = _slicedToArray(_ref11, 2),
        pid = _ref12[0],
        localRemove = _ref12[1];

    if (localRemove) commit('c3s/activity/SET_ACTIVITY', null);
    return makeRequest(commit, rootState.c3s.client.apis.Activities.delete_activity, {
      id: pid
    }, undefined);
  }
351778
private void removeActivityWithConstraints(String activity) {
		Validate.notNull(activity);
		Validate.notEmpty(activity);
		Set<String> currentActivities = getActivitiesWithRoutingConstraints();
		currentActivities.remove(activity);
		setProperty(ConstraintContextProperty.ACTIVITIES_WITH_CONSTRAINTS, ArrayUtils.toString(currentActivities.toArray()));
	}
208551
@Override
  public void recordActivityEnd(ExecutionEntity executionEntity, String deleteReason) {
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
      HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(executionEntity, false, true);
      if (historicActivityInstance != null) {
        historicActivityInstance.markEnded(deleteReason);
        
        // Fire event
        ActivitiEventDispatcher activitiEventDispatcher = getEventDispatcher();
        if (activitiEventDispatcher != null && activitiEventDispatcher.isEnabled()) {
          activitiEventDispatcher.dispatchEvent(
              ActivitiEventBuilder.createEntityEvent(ActivitiEventType.HISTORIC_ACTIVITY_INSTANCE_ENDED, historicActivityInstance));
        }
      }
    }
  }
813503
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
    public static void detach(Activity activity, ViewTreeObserver.OnGlobalLayoutListener l) {
        ViewGroup contentView = activity.findViewById(android.R.id.content);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            contentView.getViewTreeObserver().removeOnGlobalLayoutListener(l);
        } else {
            //noinspection deprecation
            contentView.getViewTreeObserver().removeGlobalOnLayoutListener(l);
        }
    }
301999
public CompoundActivity addActivity(Activity activity) {
		if(activity != null) {
			logger.trace("adding sub-activity '{}' to list", activity.getId());
			activities.add(activity);
		}
		return this;
	}
614405
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public static void restartActivity(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            activity.recreate();
        } else {
            Intent intent = activity.getIntent();
            intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            activity.finish();
            activity.overridePendingTransition(0, 0);

            activity.startActivity(intent);
            activity.overridePendingTransition(0, 0);
        }
    }
815485
@Override
	public void onActivityStopped(final Activity activity) {
		if (foregroundActivities.decrementAndGet() < 0) {
			ApptentiveLog.e("Incorrect number of foreground Activities encountered. Resetting to 0.");
			foregroundActivities.set(0);
		}

		if (checkFgBgRoutine != null) {
			delayedChecker.removeCallbacks(checkFgBgRoutine);
		}

		/* When one activity transits to another one, there is a brief period during which the former
		 * is paused but the latter has not yet resumed. To prevent false negative, check routine is
		 * delayed
		 */
		delayedChecker.postDelayed(checkFgBgRoutine = new Runnable() {
			@Override
			public void run() {
				try {
					if (foregroundActivities.get() == 0 && isAppForeground) {
						appEnteredBackground();
						isAppForeground = false;
					}
				} catch (Exception e) {
					ApptentiveLog.e(e, "Exception in delayed checking");
					ErrorMetrics.logException(e);
				}
			}
		}, CHECK_DELAY_SHORT);

		dispatchOnConversationQueue(new DispatchTask() {
			@Override
			protected void execute() {
				ApptentiveNotificationCenter.defaultCenter()
						.postNotification(NOTIFICATION_ACTIVITY_STOPPED, NOTIFICATION_KEY_ACTIVITY, activity);
			}
		});
	}
794590
@Override
	public void removeActions(String nodeID) {

		// Stop local services
		if (this.nodeID.equals(nodeID)) {
			stopAllLocalServices();
		}

		// Remove actions
		final long stamp = lock.writeLock();
		try {
			Iterator<Strategy<ActionEndpoint>> endpoints = strategies.values().iterator();
			while (endpoints.hasNext()) {
				Strategy<ActionEndpoint> strategy = endpoints.next();
				strategy.remove(nodeID);
				if (strategy.isEmpty()) {
					endpoints.remove();
				}
			}

			// Update service names
			names.clear();
			names.addAll(strategies.keySet());

			// Delete cached node descriptor
			if (this.nodeID.equals(nodeID)) {
				clearDescriptorCache();
			}

		} finally {
			lock.unlockWrite(stamp);
		}

		// Reject promises
		Iterator<PendingPromise> pendingPromises = promises.values().iterator();
		boolean removed = false;
		while (pendingPromises.hasNext()) {
			PendingPromise pending = pendingPromises.next();
			if (pending.nodeID.equals(nodeID)) {
				removed = true;
				pendingPromises.remove();
				executor.execute(() -> {
					try {
						pending.promise.complete(new RequestRejectedError(nodeID, pending.action));
					} catch (Throwable cause) {
						logger.warn("Unable to reject action \"" + pending.action + "\"!", cause);
					}
				});
			}
		}

		// Reschedule timeout checker
		if (removed) {
			scheduler.execute(() -> {
				reschedule(Long.MAX_VALUE);
			});
		}

		// Notify listeners
		if (this.nodeID.equals(nodeID)) {

			// Notify local listeners (LOCAL services changed)
			broadcastServicesChanged(true);
		} else {

			// Notify local listeners (REMOTE services changed)
			broadcastServicesChanged(false);
		}
	}
1068597
public void removeConnection (Connection connection) {
		if (connection == null) throw new IllegalArgumentException("connection cannot be null.");

		connection.removeListener(invokeListener);

		synchronized (connectionsLock) {
			ArrayList<Connection> temp = new ArrayList(Arrays.asList(connections));
			temp.remove(connection);
			connections = temp.toArray(new Connection[temp.size()]);
		}

		if (TRACE) trace("kryonet", "Removed connection from ObjectSpace: " + connection);
	}
982108
public static void remove(@NonNull Activity activity, @NonNull String viewId) {
    if (activity == null) {
      throw new NullPointerException("Activity is null");
    }

    ActivityScopedCache activityScope = getActivityScope(activity);
    if (activityScope != null) {
      activityScope.remove(viewId);
    }
  }
1221463
public void remove( Tuple tuple)
    {
    int i = unused_.indexOf( tuple);
    if( i >= 0)
      {
      unused_.remove( tuple);
      }
    }
881385
public void activityEnded(ActivityHandle ah) {		
		if (tracer.isFineEnabled()) {
			tracer.fine("activityEnded( handle = "+ah+")");
		}
		// just remove the handle
	    activities.remove(ah);
	}