public final void addCategory(String category){
  if (mCategories == null)   mCategories=new ArrayList<String>();
  if (!mCategories.contains(category)) {
    mCategories.add(category.intern());
  }
}

public final void addCategory ( String category ) { if ( mCategories == null ) mCategories = new ArrayList < String > ( ) ; if ( ! mCategories . contains ( category ) ) { mCategories . add ( category . intern ( ) ) ; } }
add a new intent category to match against . the semantics of categories is the opposite of actions - - an intent includes the categories that it requires , all of which must be included in the filter in order to match . in other words , adding a category to the filter has no impact on matching unless that category is specified in the intent .
