Lines Matching refs:match

40  * match against actions, categories, and data (either via its type, scheme,
58 * only match intents that contain no data.
63 * specified must match the contents of the Intent. If you specify a scheme
65 * match; a content: URI will never match because they always have a MIME type
67 * has somewhat special meaning: it will match either an Intent with no URI
69 * then only an Intent with no data or type will match. To specify an authority,
82 * <p>A match is based on the following rules. Note that
83 * for an IntentFilter to match an Intent, three conditions must hold:
84 * the <strong>action</strong> and <strong>category</strong> must match, and
86 * <strong>data scheme+authority+path</strong> if specified) must match.
88 * <p><strong>Action</strong> matches if any of the given values match the
91 * <p><strong>Data Type</strong> matches if any of the given values match the
95 * type "audio/*" will match "audio/mpeg", "audio/aiff", "audio/*", etc.
100 * <p><strong>Data Scheme</strong> matches if any of the given values match the
108 * <p><strong>Data Authority</strong> matches if any of the given values match
117 * <p><strong>Data Path</strong> matches if any of the given values match the
123 * <p><strong>Categories</strong> match if <em>all</em> of the categories in
124 * the Intent match categories given in the filter. Extra categories in the
125 * filter that are not in the Intent will not cause the match to fail. Note
127 * will only match an Intent that does not have any categories.
164 * The part of a match constant that describes the category of match
169 * values indicate a better match.
174 * The part of a match constant that applies a quality adjustment to the
175 * basic category of match. The value {@link #MATCH_ADJUSTMENT_NORMAL}
182 * Quality adjustment applied to the category of match that signifies
217 * The filter didn't match due to different MIME types.
221 * The filter didn't match due to different data URIs.
225 * The filter didn't match due to different actions.
229 * The filter didn't match because it required one or more categories
320 * @param action The action to match, i.e. Intent.ACTION_VIEW.
321 * @param dataType The type to match, i.e. "vnd.android.cursor.dir/person".
346 * filter will only match intents that contain no data.
348 * @param action The action to match, i.e. Intent.ACTION_MAIN.
368 * @param action The action to match, i.e. Intent.ACTION_VIEW.
369 * @param dataType The type to match, i.e. "vnd.android.cursor.dir/person".
435 * Add a new Intent action to match against. If any actions are included
437 * it to match. If no actions are included, the Intent action is ignored.
439 * @param action Name of the action to match, i.e. Intent.ACTION_VIEW.
475 * specify any actions, the match will always fail.
494 * Add a new Intent data type to match against. If any types are
497 * are included, then an Intent will only match if it specifies no data.
508 * @param type Name of the data type to match, i.e. "vnd.android.cursor.dir/person".
569 * Add a new Intent data scheme to match against. If any schemes are
572 * are included, then an Intent will match only if it includes no data.
580 * @param scheme Name of the scheme to match, i.e. "http".
669 * @param data The Uri to match.
674 public int match(Uri data) {
701 * Add a new Intent data authority to match against. The filter must
704 * included in the filter, then an Intent's data must match one of
705 * them. If no authorities are included, then only the scheme must match.
713 * @param host The host part of the authority to match. May start with a
715 * @param port Optional port part of the authority to match. If null, any
764 * Add a new Intent data path to match against. The filter must
768 * included in the filter, then an Intent's data must match one of
770 * match.
773 * match or match against a prefix, or it can be a simple globbing pattern.
774 * If the latter, you can use '*' anywhere in the pattern to match zero
775 * or more instances of the previous character, '.' as a wildcard to match
778 * @param path Either a raw string that must exactly match the file
781 * determine a match: either {@link PatternMatcher#PATTERN_LITERAL},
826 if (pe.match(data)) {
842 * the data scheme -- unlike {@link #matchData}, the authority will match
857 int match = ae.match(data);
858 if (match >= 0) {
859 return match;
868 * schemes/paths, the match will only succeed if the intent does not
871 * <p>Be aware that to match against an authority, you must also specify a base
872 * scheme the authority is in. To match against a data path, both a scheme
889 * @param data The full data string to match against, as supplied in
892 * @return Returns either a valid match constant (a combination of
894 * or one of the error codes {@link #NO_MATCH_TYPE} if the type didn't match
895 * or {@link #NO_MATCH_DATA} if the scheme/path didn't match.
897 * @see #match
905 int match = MATCH_CATEGORY_EMPTY;
914 match = MATCH_CATEGORY_SCHEME;
923 match = authMatch;
925 match = MATCH_CATEGORY_PATH;
934 // Special case: match either an Intent with no data URI,
948 match = MATCH_CATEGORY_TYPE;
953 // If no MIME types are specified, then we will only match against
960 return match + MATCH_ADJUSTMENT_NORMAL;
964 * Add a new Intent category to match against. The semantics of
967 * filter in order to match. In other words, adding a category to the
971 * @param category Name of category to match, i.e. Intent.CATEGORY_EMBED.
1017 * filter, the match fails.
1022 * @return If all categories match (success), null; else the name of the
1023 * first category that didn't match.
1051 * Intent.resolveType(); otherwise a simple match against
1055 * @return Returns either a valid match constant (a combination of
1057 * or one of the error codes {@link #NO_MATCH_TYPE} if the type didn't match,
1058 * {@link #NO_MATCH_DATA} if the scheme/path didn't match,
1059 * {@link #NO_MATCH_ACTION if the action didn't match, or
1060 * {@link #NO_MATCH_CATEGORY} if one or more categories didn't match.
1062 * @return How well the filter matches. Negative if it doesn't match,
1064 * value representing a better match.
1066 * @see #match(String, String, String, android.net.Uri , Set, String)
1068 public final int match(ContentResolver resolver, Intent intent,
1071 return match(intent.getAction(), type, intent.getScheme(),
1076 * Test whether this filter matches the given intent data. A match is
1077 * only successful if the actions and categories in the Intent match
1079 * the match result returned will be as per {@link #matchData}.
1081 * @param action The intent action to match against (Intent.getAction).
1082 * @param type The intent type to match against (Intent.resolveType()).
1083 * @param scheme The data scheme to match against (Intent.getScheme()).
1084 * @param data The data URI to match against (Intent.getData()).
1085 * @param categories The categories to match against
1089 * @return Returns either a valid match constant (a combination of
1091 * or one of the error codes {@link #NO_MATCH_TYPE} if the type didn't match,
1092 * {@link #NO_MATCH_DATA} if the scheme/path didn't match,
1093 * {@link #NO_MATCH_ACTION if the action didn't match, or
1094 * {@link #NO_MATCH_CATEGORY} if one or more categories didn't match.
1103 public final int match(String action, String type, String scheme,
1457 // Deal with an Intent wanting to match every type in the IntentFilter.
1463 // Deal with this IntentFilter wanting to match every Intent type.