Home
last modified time | relevance | path

Searched refs:Rule (Results 1 – 25 of 47) sorted by relevance

12

/frameworks/base/tools/split-select/
DTestRules.h27 struct AndRule : public Rule {
29 op = Rule::AND_SUBRULES; in AndRule()
32 AndRule& add(const Rule& rhs) { in add()
33 subrules.add(new Rule(rhs)); in add()
38 struct OrRule : public Rule {
40 op = Rule::OR_SUBRULES; in OrRule()
43 OrRule& add(const Rule& rhs) { in add()
44 subrules.add(new Rule(rhs)); in add()
49 const Rule EqRule(Rule::Key key, long value);
50 const Rule LtRule(Rule::Key key, long value);
[all …]
DTestRules.cpp27 const Rule EqRule(Rule::Key key, long value) { in EqRule()
28 Rule rule; in EqRule()
29 rule.op = Rule::EQUALS; in EqRule()
35 const Rule GtRule(Rule::Key key, long value) { in GtRule()
36 Rule rule; in GtRule()
37 rule.op = Rule::GREATER_THAN; in GtRule()
43 const Rule LtRule(Rule::Key key, long value) { in LtRule()
44 Rule rule; in LtRule()
45 rule.op = Rule::LESS_THAN; in LtRule()
51 const Rule ContainsAnyRule(Rule::Key key, const char* str1) { in ContainsAnyRule()
[all …]
DRuleGenerator.cpp35 sp<Rule> RuleGenerator::generateDensity(const Vector<int>& allDensities, size_t index) { in generateDensity()
37 sp<Rule> densityRule = new Rule(); in generateDensity()
38 densityRule->op = Rule::AND_SUBRULES; in generateDensity()
44 sp<Rule> version = new Rule(); in generateDensity()
45 version->op = Rule::LESS_THAN; in generateDensity()
46 version->key = Rule::SDK_VERSION; in generateDensity()
52 sp<Rule> gt = new Rule(); in generateDensity()
53 gt->op = Rule::GREATER_THAN; in generateDensity()
54 gt->key = Rule::SCREEN_DENSITY; in generateDensity()
60 sp<Rule> lt = new Rule(); in generateDensity()
[all …]
DRule_test.cpp33 Rule rule(AndRule() in TEST()
34 .add(EqRule(Rule::SDK_VERSION, 7)) in TEST()
36 .add(GtRule(Rule::SCREEN_DENSITY, 10)) in TEST()
37 .add(LtRule(Rule::SCREEN_DENSITY, 5)) in TEST()
78 sp<Rule> rule = new Rule(AndRule() in TEST()
79 .add(EqRule(Rule::SDK_VERSION, 7)) in TEST()
82 EXPECT_RULES_EQ(Rule::simplify(rule), EqRule(Rule::SDK_VERSION, 7)); in TEST()
86 sp<Rule> rule = new Rule(AndRule() in TEST()
88 .add(EqRule(Rule::SDK_VERSION, 7)) in TEST()
90 .add(EqRule(Rule::SDK_VERSION, 8)) in TEST()
[all …]
DRuleGenerator_test.cpp37 ContainsAnyRule(Rule::NATIVE_PLATFORM, "armeabi") in TEST()
41 ContainsAnyRule(Rule::NATIVE_PLATFORM, "armeabi-v7a", "arm64-v8a") in TEST()
45 ContainsAnyRule(Rule::NATIVE_PLATFORM, "x86", "x86_64") in TEST()
64 .add(LtRule(Rule::SCREEN_DENSITY, 263)) in TEST()
69 .add(GtRule(Rule::SCREEN_DENSITY, 262)) in TEST()
70 .add(LtRule(Rule::SCREEN_DENSITY, 363)) in TEST()
75 .add(GtRule(Rule::SCREEN_DENSITY, 362)) in TEST()
88 .add(LtRule(Rule::SDK_VERSION, SDK_LOLLIPOP)) in TEST()
89 .add(LtRule(Rule::SCREEN_DENSITY, 263)) in TEST()
94 .add(LtRule(Rule::SDK_VERSION, SDK_LOLLIPOP)) in TEST()
[all …]
DRule.h29 struct Rule : public virtual android::RefBase { struct
30 inline Rule();
31 Rule(const Rule& rhs);
65 android::Vector<android::sp<Rule> > subrules; argument
69 static android::sp<Rule> simplify(android::sp<Rule> rule);
72 Rule::Rule() in Rule() function
DRule.cpp32 Rule::Rule(const Rule& rhs) in Rule() function in split::Rule
42 String8 Rule::toJson(int indent) const { in toJson()
177 sp<Rule> Rule::simplify(sp<Rule> rule) { in simplify()
182 Vector<sp<Rule> > newSubrules; in simplify()
186 sp<Rule> simplifiedRule = simplify(rule->subrules.editItemAt(i)); in simplify()
DSplitSelector_test.cpp56 KeyedVector<SplitDescription, sp<Rule> > rules = selector.getRules(); in TEST()
59 sp<Rule> rule = rules[idx]; in TEST()
65 Rule expectedRule(test::AndRule() in TEST()
66 .add(test::GtRule(Rule::SDK_VERSION, 3)) in TEST()
67 .add(test::GtRule(Rule::SCREEN_DENSITY, 180)) in TEST()
68 .add(test::LtRule(Rule::SCREEN_DENSITY, 263))); in TEST()
DRuleGenerator.h31 …static android::sp<Rule> generate(const android::SortedVector<SplitDescription>& group, size_t ind…
33 …static android::sp<Rule> generateAbi(const android::Vector<abi::Variant>& allVariants, size_t inde…
34 … static android::sp<Rule> generateDensity(const android::Vector<int>& allDensities, size_t index);
DSplitSelector.cpp68 KeyedVector<SplitDescription, sp<Rule> > SplitSelector::getRules() const { in getRules()
69 KeyedVector<SplitDescription, sp<Rule> > rules; in getRules()
76 sp<Rule> rule = Rule::simplify(RuleGenerator::generate(splits, j)); in getRules()
DMain.cpp78 KeyedVector<SplitDescription, sp<Rule> > rules(selector.getRules()); in generate()
93 sp<Rule> masterRule = new Rule(); in generate()
94 masterRule->op = Rule::OR_SUBRULES; in generate()
100 masterRule = Rule::simplify(masterRule); in generate()
DSplitSelector.h36 android::KeyedVector<SplitDescription, android::sp<Rule> > getRules() const;
/frameworks/base/services/core/java/com/android/server/firewall/
DIntentFirewall.java153 List<Rule> candidateRules; in checkIntent()
156 candidateRules = new ArrayList<Rule>(); in checkIntent()
163 Rule rule = candidateRules.get(i); in checkIntent()
302 List<List<Rule>> rulesByType = new ArrayList<List<Rule>>(3); in readRules()
304 rulesByType.add(new ArrayList<Rule>()); in readRules()
336 Rule rule = new Rule(); in readRules()
338 List<Rule> rules = rulesByType.get(ruleType); in readRules()
369 List<Rule> rules = rulesByType.get(ruleType); in readRules()
373 Rule rule = rules.get(ruleIndex); in readRules()
413 private static class Rule extends AndFilter { class in IntentFirewall
[all …]
/frameworks/support/design/tests/src/android/support/design/widget/
DBaseInstrumentationTestCase.java22 import org.junit.Rule;
27 @Rule
DBottomSheetBehaviorInitialStateTest.java28 import org.junit.Rule;
35 @Rule
/frameworks/support/v4/tests/java/android/support/v4/
DBaseInstrumentationTestCase.java22 import org.junit.Rule;
27 @Rule
/frameworks/support/percent/tests/java/android/support/percent/
DBaseInstrumentationTestCase.java27 import org.junit.Rule;
34 @Rule
/frameworks/support/v7/appcompat/tests/src/android/support/v7/app/
DBaseInstrumentationTestCase.java19 import org.junit.Rule;
31 @Rule
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/util/
DBaseThreadedTest.java21 import org.junit.Rule;
31 @Rule
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/nan/
DTlvBufferUtilsTest.java24 import org.junit.Rule;
34 @Rule
37 @Rule
/frameworks/base/core/tests/coretests/src/android/view/
DViewCaptureTest.java31 import org.junit.Rule;
48 @Rule
DRemoteViewsTest.java20 import org.junit.Rule;
49 @Rule
/frameworks/support/v4/tests/java/android/support/v4/app/
DNestedFragmentRestoreTest.java29 import org.junit.Rule;
43 @Rule
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiCertManagerTest.java30 import org.junit.Rule;
49 @Rule public TemporaryFolder mTempFolder = new TemporaryFolder();
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/test/
DRecyclerViewTest.java19 import org.junit.Rule;
48 @Rule

12