Searched refs:rule (Results 1 - 25 of 59) sorted by relevance

123

/frameworks/base/tools/split-select/
H A DTestRules.cpp28 Rule rule; local
29 rule.op = Rule::EQUALS;
30 rule.key = key;
31 rule.longArgs.add(value);
32 return rule;
36 Rule rule; local
37 rule.op = Rule::GREATER_THAN;
38 rule.key = key;
39 rule.longArgs.add(value);
40 return rule;
44 Rule rule; local
52 Rule rule; local
60 Rule rule; local
69 Rule rule; local
[all...]
H A DRule_test.cpp33 Rule rule(AndRule()
71 std::string result(rule.toJson().string());
78 sp<Rule> rule = new Rule(AndRule() local
82 EXPECT_RULES_EQ(Rule::simplify(rule), EqRule(Rule::SDK_VERSION, 7));
86 sp<Rule> rule = new Rule(AndRule() local
93 EXPECT_RULES_EQ(Rule::simplify(rule),
H A DRule.cpp177 sp<Rule> Rule::simplify(sp<Rule> rule) { argument
178 if (rule->op != AND_SUBRULES && rule->op != OR_SUBRULES) {
179 return rule;
183 newSubrules.setCapacity(rule->subrules.size());
184 const size_t subruleCount = rule->subrules.size();
186 sp<Rule> simplifiedRule = simplify(rule->subrules.editItemAt(i));
188 if (simplifiedRule->op == rule->op) {
202 rule->subrules = newSubrules;
203 return rule;
[all...]
H A DSplitSelector.cpp76 sp<Rule> rule = Rule::simplify(RuleGenerator::generate(splits, j)); local
77 if (rule != NULL) {
78 rules.add(splits[j], rule);
H A DSplitSelector_test.cpp59 sp<Rule> rule = rules[idx]; local
60 ASSERT_TRUE(rule != NULL);
69 EXPECT_RULES_EQ(rule, expectedRule);
H A DRule.h69 static android::sp<Rule> simplify(android::sp<Rule> rule);
/frameworks/base/media/java/android/media/audiopolicy/
H A DAudioMixingRule.java32 * Here's an example of creating a mixing rule for all media playback:
51 * A rule requiring the usage information of the {@link AudioAttributes} to match.
52 * This mixing rule can be added with {@link Builder#addRule(AudioAttributes, int)} or
59 * A rule requiring the capture preset information of the {@link AudioAttributes} to match.
60 * This mixing rule can be added with {@link Builder#addRule(AudioAttributes, int)} or
67 * A rule requiring the UID of the audio stream to match that specified.
68 * This mixing rule can be added with {@link Builder#addMixRule(int, Object)} where the Object
77 * A rule requiring the usage information of the {@link AudioAttributes} to differ.
83 * A rule requiring the capture preset information of the {@link AudioAttributes} to differ.
89 * A rule requirin
100 AudioMixMatchCriterion(AudioAttributes attributes, int rule) argument
106 AudioMixMatchCriterion(Integer intProp, int rule) argument
148 isValidSystemApiRule(int rule) argument
159 isValidAttributesSystemApiRule(int rule) argument
170 isValidRule(int rule) argument
182 isPlayerRule(int rule) argument
230 addRule(AudioAttributes attrToMatch, int rule) argument
259 excludeRule(AudioAttributes attrToMatch, int rule) argument
281 addMixRule(int rule, Object property) argument
311 excludeMixRule(int rule, Object property) argument
326 checkAddRuleObjInternal(int rule, Object property) argument
365 addRuleInternal(AudioAttributes attrToMatch, Integer intProp, int rule) argument
[all...]
H A DAudioMix.java52 private AudioMix(AudioMixingRule rule, AudioFormat format, int routeFlags, int callbackFlags, argument
54 mRule = rule;
57 mMixType = rule.getTargetMixType();
198 * @param rule a non-null {@link AudioMixingRule} instance.
202 public Builder(AudioMixingRule rule) argument
204 if (rule == null) {
207 mRule = rule;
213 * @param rule
217 Builder setMixingRule(AudioMixingRule rule) argument
219 if (rule
[all...]
/frameworks/support/transition/tests/src/android/support/transition/
H A DBaseTest.java19 import android.support.test.rule.ActivityTestRule;
30 public final ActivityTestRule<TransitionActivity> rule; field in class:BaseTest
33 rule = new ActivityTestRule(TransitionActivity.class);
H A DSceneTest.java37 TransitionActivity activity = rule.getActivity();
46 TransitionActivity activity = rule.getActivity();
66 TransitionActivity activity = rule.getActivity();
85 TransitionActivity activity = rule.getActivity();
96 TransitionActivity activity = rule.getActivity();
108 TransitionActivity activity = rule.getActivity();
119 TransitionActivity activity = rule.getActivity();
H A DFadeTest.java45 mRoot = rule.getActivity().getRoot();
46 mView = new View(rule.getActivity());
/frameworks/base/services/core/java/com/android/server/notification/
H A DZenModeConditions.java66 if (DEBUG) Log.d(TAG, "evaluateConfig: clearing manual rule");
120 private void evaluateRule(ZenRule rule, ArraySet<Uri> current, boolean processSubscriptions) { argument
121 if (rule == null || rule.conditionId == null) return;
122 final Uri id = rule.conditionId;
127 rule.component = sp.getComponent();
132 final IConditionProvider cp = mConditionProviders.findConditionProvider(rule.component);
133 if (DEBUG) Log.d(TAG, "Ensure external rule exists: " + (cp != null) + " for " + id);
135 mConditionProviders.ensureRecordExists(rule.component, id, cp);
138 if (rule
173 updateSnoozing(ZenRule rule) argument
182 updateCondition(Uri id, Condition condition, ZenRule rule) argument
[all...]
H A DZenModeHelper.java258 for (ZenRule rule : mConfig.automaticRules.values()) {
259 if (canManageAutomaticZenRule(rule)) {
260 rules.add(rule);
268 ZenRule rule;
271 rule = mConfig.automaticRules.get(id);
273 if (rule == null) return null;
274 if (canManageAutomaticZenRule(rule)) {
275 return createAutomaticZenRule(rule);
301 throw new AndroidRuntimeException("Could not create rule");
304 Log.d(TAG, "addAutomaticZenRule rule
390 canManageAutomaticZenRule(ZenRule rule) argument
411 isSystemRule(AutomaticZenRule rule) argument
434 populateZenRule(AutomaticZenRule automaticZenRule, ZenRule rule, boolean isNew) argument
452 createAutomaticZenRule(ZenRule rule) argument
[all...]
/frameworks/support/compat/tests/java/android/support/v4/
H A DBaseInstrumentationTestCase.java20 import android.support.test.rule.ActivityTestRule;
/frameworks/support/core-ui/tests/java/android/support/v4/
H A DBaseInstrumentationTestCase.java20 import android.support.test.rule.ActivityTestRule;
/frameworks/support/design/tests/src/android/support/design/widget/
H A DBaseInstrumentationTestCase.java20 import android.support.test.rule.ActivityTestRule;
/frameworks/support/fragment/tests/java/android/support/v4/
H A DBaseInstrumentationTestCase.java20 import android.support.test.rule.ActivityTestRule;
/frameworks/base/services/core/java/com/android/server/firewall/
H A DIntentFirewall.java161 // 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
487 private final Rule rule; field in class:IntentFirewall.FirewallIntentFilter
489 FirewallIntentFilter(Rule rule) argument
529 addComponentFilter(ComponentName componentName, Rule rule) argument
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DZenModeController.java46 public void onManualRuleChanged(ZenRule rule) {} argument
/frameworks/support/percent/tests/java/android/support/percent/
H A DBaseInstrumentationTestCase.java22 import android.support.test.rule.ActivityTestRule;
/frameworks/support/v7/appcompat/tests/src/android/support/v7/app/
H A DBaseInstrumentationTestCase.java25 import android.support.test.rule.ActivityTestRule;
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/recyclerview/test/
H A DSameActivityTestRule.java18 import android.support.test.rule.ActivityTestRule;
/frameworks/base/core/java/android/service/notification/
H A DZenModeConfig.java253 final String rule = allRules.valueAt(i);
254 final ZenRule fromRule = automaticRules != null ? automaticRules.get(rule) : null;
255 final ZenRule toRule = to.automaticRules != null ? to.automaticRules.get(rule) : null;
256 ZenRule.appendDiff(d, "automaticRule[" + rule + "]", fromRule, toRule);
290 private static boolean isValidManualRule(ZenRule rule) { argument
291 return rule == null || Global.isValidZenMode(rule.zenMode) && sameCondition(rule);
294 private static boolean isValidAutomaticRule(ZenRule rule) { argument
295 return rule !
299 sameCondition(ZenRule rule) argument
514 writeRuleXml(ZenRule rule, XmlSerializer out) argument
[all...]
/frameworks/av/media/libmedia/
H A DAudioPolicy.cpp29 uint32_t rule)
30 : mRule(rule)
27 AudioMixMatchCriterion(audio_usage_t usage, audio_source_t source, uint32_t rule) argument
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/util/
H A DBaseThreadedTest.java26 import android.support.test.rule.ActivityTestRule;

Completed in 478 milliseconds

123