Home
last modified time | relevance | path

Searched refs:rule (Results 1 – 25 of 125) sorted by relevance

12345

/frameworks/base/tools/split-select/
DTestRules.cpp28 Rule rule; in EqRule() local
29 rule.op = Rule::EQUALS; in EqRule()
30 rule.key = key; in EqRule()
31 rule.longArgs.add(value); in EqRule()
32 return rule; in EqRule()
36 Rule rule; in GtRule() local
37 rule.op = Rule::GREATER_THAN; in GtRule()
38 rule.key = key; in GtRule()
39 rule.longArgs.add(value); in GtRule()
40 return rule; in GtRule()
[all …]
DRule.cpp177 sp<Rule> Rule::simplify(sp<Rule> rule) { in simplify() argument
178 if (rule->op != AND_SUBRULES && rule->op != OR_SUBRULES) { in simplify()
179 return rule; in simplify()
183 newSubrules.setCapacity(rule->subrules.size()); in simplify()
184 const size_t subruleCount = rule->subrules.size(); in simplify()
186 sp<Rule> simplifiedRule = simplify(rule->subrules.editItemAt(i)); in simplify()
188 if (simplifiedRule->op == rule->op) { in simplify()
202 rule->subrules = newSubrules; in simplify()
203 return rule; in simplify()
DRule_test.cpp33 Rule rule(AndRule() in TEST() local
71 std::string result(rule.toJson().string()); in TEST()
78 sp<Rule> rule = new Rule(AndRule() in TEST() local
82 EXPECT_RULES_EQ(Rule::simplify(rule), EqRule(Rule::SDK_VERSION, 7)); in TEST()
86 sp<Rule> rule = new Rule(AndRule() in TEST() local
93 EXPECT_RULES_EQ(Rule::simplify(rule), in TEST()
DSplitSelector.cpp76 sp<Rule> rule = Rule::simplify(RuleGenerator::generate(splits, j)); in getRules() local
77 if (rule != NULL) { in getRules()
78 rules.add(splits[j], rule); in getRules()
DSplitSelector_test.cpp59 sp<Rule> rule = rules[idx]; in TEST() local
60 ASSERT_TRUE(rule != NULL); in TEST()
69 EXPECT_RULES_EQ(rule, expectedRule); in TEST()
/frameworks/base/media/java/android/media/audiopolicy/
DAudioMixingRule.java107 AudioMixMatchCriterion(AudioAttributes attributes, int rule) { in AudioMixMatchCriterion() argument
110 mRule = rule; in AudioMixMatchCriterion()
113 AudioMixMatchCriterion(Integer intProp, int rule) { in AudioMixMatchCriterion() argument
116 mRule = rule; in AudioMixMatchCriterion()
200 private static boolean isValidSystemApiRule(int rule) { in isValidSystemApiRule() argument
202 switch (rule) { in isValidSystemApiRule()
211 private static boolean isValidAttributesSystemApiRule(int rule) { in isValidAttributesSystemApiRule() argument
213 switch (rule) { in isValidAttributesSystemApiRule()
222 private static boolean isValidRule(int rule) { in isValidRule() argument
223 final int match_rule = rule & ~RULE_EXCLUSION_MASK; in isValidRule()
[all …]
DAudioMix.java62 private AudioMix(AudioMixingRule rule, AudioFormat format, int routeFlags, int callbackFlags, in AudioMix() argument
64 mRule = rule; in AudioMix()
67 mMixType = rule.getTargetMixType(); in AudioMix()
282 public Builder(AudioMixingRule rule) in Builder() argument
284 if (rule == null) { in Builder()
287 mRule = rule; in Builder()
297 Builder setMixingRule(AudioMixingRule rule) in setMixingRule() argument
299 if (rule == null) { in setMixingRule()
302 mRule = rule; in setMixingRule()
/frameworks/base/services/core/java/com/android/server/notification/
DZenModeConditions.java123 private void evaluateRule(ZenRule rule, ArraySet<Uri> current, ComponentName trigger, in evaluateRule() argument
125 if (rule == null || rule.conditionId == null) return; in evaluateRule()
126 if (rule.configurationActivity != null) return; in evaluateRule()
127 final Uri id = rule.conditionId; in evaluateRule()
132 rule.component = sp.getComponent(); in evaluateRule()
138 final IConditionProvider cp = mConditionProviders.findConditionProvider(rule.component); in evaluateRule()
141 mConditionProviders.ensureRecordExists(rule.component, id, cp); in evaluateRule()
145 if (rule.component == null && rule.enabler == null) { in evaluateRule()
146 Log.w(TAG, "No component found for automatic rule: " + rule.conditionId); in evaluateRule()
147 rule.enabled = false; in evaluateRule()
[all …]
DZenModeHelper.java269 for (ZenRule rule : mConfig.automaticRules.values()) { in getZenRules()
270 if (canManageAutomaticZenRule(rule)) { in getZenRules()
271 rules.add(rule); in getZenRules()
279 ZenRule rule; in getAutomaticZenRule() local
282 rule = mConfig.automaticRules.get(id); in getAutomaticZenRule()
284 if (rule == null) return null; in getAutomaticZenRule()
285 if (canManageAutomaticZenRule(rule)) { in getAutomaticZenRule()
286 return createAutomaticZenRule(rule); in getAutomaticZenRule()
323 ZenRule rule = new ZenRule(); in addAutomaticZenRule() local
324 populateZenRule(automaticZenRule, rule, true); in addAutomaticZenRule()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DZenModeConfigTest.java159 ZenModeConfig.ZenRule rule = new ZenModeConfig.ZenRule(); in testRuleXml() local
160 rule.configurationActivity = new ComponentName("a", "a"); in testRuleXml()
161 rule.component = new ComponentName("a", "b"); in testRuleXml()
162 rule.conditionId = new Uri.Builder().scheme("hello").build(); in testRuleXml()
163 rule.condition = new Condition(rule.conditionId, "", Condition.STATE_TRUE); in testRuleXml()
164 rule.enabled = true; in testRuleXml()
165 rule.creationTime = 123; in testRuleXml()
166 rule.id = "id"; in testRuleXml()
167 rule.zenMode = Settings.Global.ZEN_MODE_ALARMS; in testRuleXml()
168 rule.modified = true; in testRuleXml()
[all …]
/frameworks/base/tools/aapt2/java/
DAnnotationProcessor.cpp71 for (const AnnotationRule& rule : sAnnotationRules) { in AppendCommentLine() local
72 std::string::size_type idx = comment.find(rule.doc_str.data()); in AppendCommentLine()
74 annotation_bit_mask_ |= rule.bit_mask; in AppendCommentLine()
75 comment.erase(comment.begin() + idx, comment.begin() + idx + rule.doc_str.size()); in AppendCommentLine()
126 for (const AnnotationRule& rule : sAnnotationRules) { in Print() local
127 if (annotation_bit_mask_ & rule.bit_mask) { in Print()
128 printer->Println(rule.annotation); in Print()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DCarrierResolver.java391 public void setTestOverrideCarrierPriviledgeRule(String rule) { in setTestOverrideCarrierPriviledgeRule() argument
392 logd("[setTestOverrideCarrierPriviledgeRule]: " + rule); in setTestOverrideCarrierPriviledgeRule()
393 mTestOverrideCarrierPriviledgeRule = rule; in setTestOverrideCarrierPriviledgeRule()
557 private CarrierMatchingRule(CarrierMatchingRule rule) { in CarrierMatchingRule() argument
558 mccMnc = rule.mccMnc; in CarrierMatchingRule()
559 imsiPrefixPattern = rule.imsiPrefixPattern; in CarrierMatchingRule()
560 iccidPrefix = rule.iccidPrefix; in CarrierMatchingRule()
561 gid1 = rule.gid1; in CarrierMatchingRule()
562 gid2 = rule.gid2; in CarrierMatchingRule()
563 plmn = rule.plmn; in CarrierMatchingRule()
[all …]
/frameworks/base/services/core/java/com/android/server/firewall/
DIntentFirewall.java163 Rule rule = candidateRules.get(i); in checkIntent() local
164 if (rule.matches(this, resolvedComponent, intent, callerUid, callerPid, resolvedType, in checkIntent()
166 block |= rule.getBlock(); in checkIntent()
167 log |= rule.getLog(); in checkIntent()
336 Rule rule = new Rule(); in readRules() local
343 rule.readFromXml(parser); in readRules()
349 rules.add(rule); in readRules()
373 Rule rule = rules.get(ruleIndex); in readRules() local
374 for (int i=0; i<rule.getIntentFilterCount(); i++) { in readRules()
375 resolver.addFilter(rule.getIntentFilter(i)); in readRules()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/
DDataEnabledOverride.java84 OverrideRule(@NonNull String rule) { in OverrideRule() argument
85 String[] tokens = rule.trim().split("\\s*=\\s*"); in OverrideRule()
88 + rule); in OverrideRule()
97 throw new IllegalArgumentException("Invalid APN type. Rule=" + rule); in OverrideRule()
294 for (String rule : rulesString) { in updateRules()
295 if (!TextUtils.isEmpty(rule)) { in updateRules()
296 mRules.add(new OverrideRule(rule)); in updateRules()
339 for (OverrideRule rule : mRules) { in canSatisfyAnyRule()
340 if (rule.isSatisfiedByConditions(apnType, providedConditions)) { in canSatisfyAnyRule()
383 for (OverrideRule rule : mRules) { in getRules()
[all …]
/frameworks/base/test-runner/
Djarjar-rules.txt1 rule junit.** repackaged.junit.@1
2 rule android.test.** repackaged.android.test.@1
3 rule com.android.internal.util.** repackaged.com.android.internal.util.@1
/frameworks/base/test-base/
Djarjar-rules.txt1 rule junit.** repackaged.junit.@1
2 rule android.test.** repackaged.android.test.@1
3 rule com.android.internal.util.** repackaged.com.android.internal.util.@1
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/
Dprotobuf.bzl85 _proto_gen = rule(
120 """Bazel rule to create a C++ protobuf library from proto source files
122 NOTE: the rule is only an internal workaround to generate protos. The
123 interface may change and the rule may be removed when bazel has introduced
124 the native rule.
136 The rule will simply be a provider for .proto files, so that other
161 # An empty cc_library to make rule dependency consistent.
199 """Bazel rule to generate the gen_well_known_protos_java genrule
262 """Bazel rule to create a Python protobuf library from proto source files
264 NOTE: the rule is only an internal workaround to generate protos. The
[all …]
/frameworks/base/tools/aapt2/link/
DXmlCompatVersioner.cpp55 const ApiVersion& src_attr_version, const IDegradeRule* rule, in ProcessRule() argument
86 if (rule != nullptr) { in ProcessRule()
87 for (const DegradeResult& result : rule->Degrade(src_el, src_attr, out_string_pool)) { in ProcessRule()
121 auto rule = rules_->find(attr_resid); in ProcessDoc() local
122 ProcessRule(el, attr, attr_version, rule != rules_->end() ? rule->second.get() : nullptr, in ProcessDoc()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkPolicyLogger.java170 void uidFirewallRuleChanged(int chain, int uid, int rule) { in uidFirewallRuleChanged() argument
172 if (LOGV) Slog.v(TAG, getUidFirewallRuleChangedLog(chain, uid, rule)); in uidFirewallRuleChanged()
173 mEventsBuffer.uidFirewallRuleChanged(chain, uid, rule); in uidFirewallRuleChanged()
282 private static String getUidFirewallRuleChangedLog(int chain, int uid, int rule) { in getUidFirewallRuleChangedLog() argument
284 uid, getFirewallChainName(chain), getFirewallRuleName(rule)); in getUidFirewallRuleChangedLog()
304 private static String getFirewallRuleName(int rule) { in getFirewallRuleName() argument
305 switch (rule) { in getFirewallRuleName()
313 return String.valueOf(rule); in getFirewallRuleName()
456 public void uidFirewallRuleChanged(int chain, int uid, int rule) { in uidFirewallRuleChanged() argument
464 data.ifield3 = rule; in uidFirewallRuleChanged()
/frameworks/base/core/java/android/service/notification/
DZenModeConfig.java330 final String rule = allRules.valueAt(i); in diff() local
331 final ZenRule fromRule = automaticRules != null ? automaticRules.get(rule) : null; in diff()
332 final ZenRule toRule = to.automaticRules != null ? to.automaticRules.get(rule) : null; in diff()
333 ZenRule.appendDiff(d, "automaticRule[" + rule + "]", fromRule, toRule); in diff()
372 private static boolean isValidManualRule(ZenRule rule) { in isValidManualRule() argument
373 return rule == null || Global.isValidZenMode(rule.zenMode) && sameCondition(rule); in isValidManualRule()
376 private static boolean isValidAutomaticRule(ZenRule rule) { in isValidAutomaticRule() argument
377 return rule != null && !TextUtils.isEmpty(rule.name) && Global.isValidZenMode(rule.zenMode) in isValidAutomaticRule()
378 && rule.conditionId != null && sameCondition(rule); in isValidAutomaticRule()
381 private static boolean sameCondition(ZenRule rule) { in sameCondition() argument
[all …]
/frameworks/av/media/libaudioclient/
DAudioPolicy.cpp45 uint32_t rule) in AudioMixMatchCriterion() argument
46 : mRule(rule) in AudioMixMatchCriterion()
163 const uint32_t rule = match ? RULE_MATCH_UID : RULE_EXCLUDE_UID; in hasUidRule() local
165 if (mCriteria[i].mRule == rule in hasUidRule()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/
DUiccCarrierPrivilegeRules.java617 private static UiccAccessRule parseRefArdo(String rule) { in parseRefArdo() argument
618 log("Got rule: " + rule); in parseRefArdo()
625 while (!rule.isEmpty()) { in parseRefArdo()
626 if (rule.startsWith(TAG_REF_DO)) { in parseRefArdo()
628 rule = refDo.parse(rule, false); in parseRefArdo()
660 } else if (rule.startsWith(TAG_AR_DO)) { in parseRefArdo()
662 rule = arDo.parse(rule, false); in parseRefArdo()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/util/python/
DBUILD7 # add a workspace rule to their WORKSPACE files to add an external workspace
9 # includes the following local_repository rule that points to this directory:
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DAmbientPulseManagerTest.java39 public MockitoRule rule = MockitoJUnit.rule(); field in AmbientPulseManagerTest
/frameworks/base/services/core/java/com/android/server/
DNetworkManagementService.java1802 int rule = rules[index]; in setFirewallUidRules() local
1803 updateFirewallUidRuleLocked(chain, uid, rule); in setFirewallUidRules()
1804 newRules.put(uid, rule); in setFirewallUidRules()
1842 public void setFirewallUidRule(int chain, int uid, int rule) { in setFirewallUidRule() argument
1845 setFirewallUidRuleLocked(chain, uid, rule); in setFirewallUidRule()
1849 private void setFirewallUidRuleLocked(int chain, int uid, int rule) { in setFirewallUidRuleLocked() argument
1850 if (updateFirewallUidRuleLocked(chain, uid, rule)) { in setFirewallUidRuleLocked()
1851 final int ruleType = getFirewallRuleType(chain, rule); in setFirewallUidRuleLocked()
1861 private boolean updateFirewallUidRuleLocked(int chain, int uid, int rule) { in updateFirewallUidRuleLocked() argument
1868 + ", newRule=" + rule + " for uid=" + uid + " on chain " + chain); in updateFirewallUidRuleLocked()
[all …]

12345