Remove old intent filters from the given activity.

@param {Object} activity - activity, from which we need to remove intent-filters.
Changes applied to the passed object.
17333
function removeIntentFiltersFromActivity(activity) {
  var oldIntentFilters = activity['intent-filter'];
  var newIntentFilters = [];

  if (oldIntentFilters == null || oldIntentFilters.length == 0) {
    return;
  }

  oldIntentFilters.forEach(function(intentFilter) {
    if (!isIntentFilterForUniversalLinks(intentFilter)) {
      newIntentFilters.push(intentFilter);
    }
  });

  activity['intent-filter'] = newIntentFilters;
}
1016914
function removeOldOptions(manifestData) {
  var cleanManifest = manifestData;
  var activities = manifestData['manifest']['application'][0]['activity'];

  activities.forEach(removeIntentFiltersFromActivity);
  cleanManifest['manifest']['application'][0]['activity'] = activities;

  return cleanManifest;
}
1262798
protected void setActivityAsyncDelegates(final ActivityImpl activity) {
    activity.setDelegateAsyncAfterUpdate(new ActivityImpl.AsyncAfterUpdate() {
      @Override
      public void updateAsyncAfter(boolean asyncAfter, boolean exclusive) {
        if (asyncAfter) {
          addMessageJobDeclaration(new AsyncAfterMessageJobDeclaration(), activity, exclusive);
        } else {
          removeMessageJobDeclarationWithJobConfiguration(activity, MessageJobDeclaration.ASYNC_AFTER);
        }
      }
    });

    activity.setDelegateAsyncBeforeUpdate(new ActivityImpl.AsyncBeforeUpdate() {
      @Override
      public void updateAsyncBefore(boolean asyncBefore, boolean exclusive) {
        if (asyncBefore) {
          addMessageJobDeclaration(new AsyncBeforeMessageJobDeclaration(), activity, exclusive);
        } else {
          removeMessageJobDeclarationWithJobConfiguration(activity, MessageJobDeclaration.ASYNC_BEFORE);
        }
      }
    });
  }
357341
public static void apply(@NonNull Activity activity) {
        ViewGroup root = (ViewGroup) activity.getWindow().getDecorView();
        if (!root.isInEditMode()) {
            applyAllRecursively(root, activity.getAssets());
        }
    }
246978
public function deleteActivty(Activity $activity)
    {
        $this->om->remove($activity);
        $this->om->flush();
    }
341417
def remove(self, obj):
        
        activity = {
            "verb": "remove",
            "object": {
                "objectType": obj.object_type,
                "id": obj.id
            },
            "target": {
                "objectType": self.object_type,
                "id": self.id
            }
        }

        self._post_activity(activity)

        # Remove the cash so it's re-generated next time it's needed
        self._members = None
28333
function( clip, optionalRoot ) {

		var action = this.existingAction( clip, optionalRoot );

		if ( action !== null ) {

			this._deactivateAction( action );
			this._removeInactiveAction( action );

		}

	}
60539
@Override
    public void onActivityResume(Activity activity) {
        // 通知hmssdk activity onResume了
        HuaweiApiClient client = getApiClient();
        if (client != null) {
            HMSAgentLog.d("tell hmssdk: onResume");
            client.onResume(activity);
        }

        // 如果正在解决错误，则处理被覆盖的场景
        HMSAgentLog.d("is resolving:" + isResolving);
        if (isResolving && !PACKAGE_NAME_HIAPP.equals(curAppPackageName)) {
            if (activity instanceof BridgeActivity) {
                resolveActivity = (BridgeActivity)activity;
                hasOverActivity = false;
                HMSAgentLog.d("received bridgeActivity:" + StrUtils.objDesc(resolveActivity));
            } else if (resolveActivity != null && !resolveActivity.isFinishing()){
                hasOverActivity = true;
                HMSAgentLog.d("received other Activity:" + StrUtils.objDesc(resolveActivity));
            }
            timeoutHandler.removeMessages(UPDATE_OVER_ACTIVITY_CHECK_TIMEOUT_HANDLE_MSG);
            timeoutHandler.sendEmptyMessageDelayed(UPDATE_OVER_ACTIVITY_CHECK_TIMEOUT_HANDLE_MSG, UPDATE_OVER_ACTIVITY_CHECK_TIMEOUT);
        }
    }
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);
        }
    }
739250
public static void restartActivity(final Activity activity) {
        Intent intent = activity.getIntent();
        activity.overridePendingTransition(0, 0);
        intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
        activity.finish();
        activity.overridePendingTransition(0, 0);
        activity.startActivity(intent);
    }
1263523
public function removeActivity(\CampaignChain\CoreBundle\Entity\ActivityModule $activities)
    {
        $this->activities->removeElement($activities);
    }
1042678
public function cleanupAction()
    {
        $params = $this->_processParameters($this->showParameters);
        $params['contentTitle'] = $this->_('Clean up existing appointments?');
        $params['filterOn']     = 'gap_id_procedure';
        $params['filterWhen']   = 'gap_filter';

        $snippets = array(
            'Generic\\ContentTitleSnippet',
            'Agenda\\AppointmentCleanupSnippet',
            'Agenda_CalendarTableSnippet',
            );

        $this->addSnippets($snippets, $params);
    }
168745
private void cleanup_event_filters() {
        Enumeration keys = event_callback_map.keys();
        while (keys.hasMoreElements()) {
            String name = (String) keys.nextElement();
            EventCallBackStruct callback_struct = event_callback_map.get(name);
            if (callback_struct.consumer instanceof NotifdEventConsumer) {
                try {
                    EventChannelStruct ec_struct = channel_map.get(callback_struct.channel_name);
                    Filter filter = ec_struct.structuredProxyPushSupplier.get_filter(callback_struct.filter_id);
                    ec_struct.structuredProxyPushSupplier.remove_filter(callback_struct.filter_id);
                    filter.destroy();
                } catch (FilterNotFound e) {
                    // Do nothing
                }
            }
        }
    }
222035
protected void addActivityHandlers(ActivityImpl activity) {
    if (historyLevel.isHistoryEventProduced(HistoryEventTypes.ACTIVITY_INSTANCE_START, null)) {
      activity.addBuiltInListener(PvmEvent.EVENTNAME_START, ACTIVITY_INSTANCE_START_LISTENER, 0);
    }
    if (historyLevel.isHistoryEventProduced(HistoryEventTypes.ACTIVITY_INSTANCE_END, null)) {
      activity.addBuiltInListener(PvmEvent.EVENTNAME_END, ACTIVITY_INSTANCE_END_LISTENER);
    }
  }
738050
function () {
      if (!codeViewer.codeActive) {
        return;
      }

      if (window.getSelection().empty) {
        window.getSelection().empty();
      }
      else if (window.getSelection().removeAllRanges) {
        window.getSelection().removeAllRanges();
      }
    }
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);
		}
	}
628554
function(ops, callback) {
        var search = typeof ops == 'string' ? { name: ops } : ops,
        query = this._query(search),
        self = this;

        //stop the app in case...
        self.stop(search.name, function(err, result) {
            if(callback) callback(err, result); 
        });

        //remove the app
        self._collection.remove(query, function(err, result){ }); 
    }