Lines Matching defs:rule

161         // rule against the intent
163 Rule rule = candidateRules.get(i);
164 if (rule.matches(this, resolvedComponent, intent, callerUid, callerPid, resolvedType,
166 block |= rule.getBlock();
167 log |= rule.getLog();
336 Rule rule = new Rule();
340 // if we get an error while parsing a particular rule, we'll just ignore
341 // that rule and continue on with the next rule
343 rule.readFromXml(parser);
345 Slog.e(TAG, "Error reading an intent firewall rule from " + rulesFile, ex);
349 rules.add(rule);
353 // if there was an error outside of a specific rule, then there are probably
373 Rule rule = rules.get(ruleIndex);
374 for (int i=0; i<rule.getIntentFilterCount(); i++) {
375 resolver.addFilter(rule.getIntentFilter(i));
377 for (int i=0; i<rule.getComponentFilterCount(); i++) {
378 resolver.addComponentFilter(rule.getComponentFilter(i), rule);
396 * Represents a single activity/service/broadcast rule within one of the xml files.
402 * and component filters to select which rules to check. If a rule has multiple intent or
403 * component filters, only a single filter must match for the rule to be passed on to the
406 * In the second phase, we check the specific conditions in each rule against the values in the
407 * intent. All top level conditions (but not filters) in the rule must match for the rule as a
410 * If the rule matches, then we block or log the intent, as specified by the rule. If multiple
411 * rules match, we combine the block/log flags from any matching rule.
487 private final Rule rule;
489 public FirewallIntentFilter(Rule rule) {
490 this.rule = rule;
498 return !dest.contains(filter.rule);
513 return filter.rule;
529 public void addComponentFilter(ComponentName componentName, Rule rule) {
531 rules = ArrayUtils.appendElement(Rule.class, rules, rule);
553 * Monitors for the creation/deletion/modification of any .xml files in the rule directory