Home
last modified time | relevance | path

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

12345678910>>...61

/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
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()
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()
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/engine/
DRuleEvaluatorTest.java29 import android.content.integrity.Rule;
58 List<Rule> rules = new ArrayList<>(); in testEvaluateRules_noRules_allow()
67 Rule rule = in testEvaluateRules_noMatchedRules_allow()
68 new Rule( in testEvaluateRules_noMatchedRules_allow()
73 Rule.DENY); in testEvaluateRules_noMatchedRules_allow()
83 Rule rule1 = in testEvaluateRules_oneMatch_deny()
84 new Rule( in testEvaluateRules_oneMatch_deny()
89 Rule.DENY); in testEvaluateRules_oneMatch_deny()
90 Rule rule2 = in testEvaluateRules_oneMatch_deny()
91 new Rule( in testEvaluateRules_oneMatch_deny()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/serializer/
DRuleIndexingDetailsIdentifierTest.java31 import android.content.integrity.Rule;
82 private static final Rule RULE_WITH_PACKAGE_NAME =
83 new Rule(
89 Rule.DENY);
90 private static final Rule RULE_WITH_APP_CERTIFICATE =
91 new Rule(
97 Rule.DENY);
98 private static final Rule RULE_WITH_INSTALLER_RESTRICTIONS =
99 new Rule(
105 Rule.DENY);
[all …]
DRuleBinarySerializerTest.java47 import android.content.integrity.Rule;
93 private static final String DENY = getBits(Rule.DENY, EFFECT_BITS);
156 Rule rule = in testBinaryStream_serializeValidCompoundFormula()
157 new Rule( in testBinaryStream_serializeValidCompoundFormula()
165 Rule.DENY); in testBinaryStream_serializeValidCompoundFormula()
221 Rule rule = in testBinaryString_serializeValidCompoundFormula_notConnector()
222 new Rule( in testBinaryString_serializeValidCompoundFormula_notConnector()
230 Rule.DENY); in testBinaryString_serializeValidCompoundFormula_notConnector()
261 Rule rule = in testBinaryString_serializeValidCompoundFormula_andConnector()
262 new Rule( in testBinaryString_serializeValidCompoundFormula_andConnector()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/integrity/
DRuleTest.java34 private static final @Rule.Effect int DENY_EFFECT = Rule.DENY;
50 Rule validRule = new Rule(PACKAGE_NAME_ATOMIC_FORMULA, DENY_EFFECT); in testValidRule()
61 () -> new Rule(null, DENY_EFFECT)); in testInvalidRule_invalidFormula()
70 Rule rule = new Rule(compoundFormula, Rule.DENY); in testToString()
81 assertThat(new Rule(PACKAGE_NAME_ATOMIC_FORMULA, DENY_EFFECT)) in testEquals_trueCase()
82 .isEqualTo(new Rule(PACKAGE_NAME_ATOMIC_FORMULA, DENY_EFFECT)); in testEquals_trueCase()
87 assertThat(new Rule(PACKAGE_NAME_ATOMIC_FORMULA, DENY_EFFECT)) in testEquals_falseCase()
88 .isNotEqualTo(new Rule(APP_CERTIFICATE_ATOMIC_FORMULA, DENY_EFFECT)); in testEquals_falseCase()
93 Rule rule = in testParcelUnparcel()
94 new Rule( in testParcelUnparcel()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/model/
DIntegrityCheckResultTest.java23 import android.content.integrity.Rule;
50 Rule forceAllowRule = in createAllowResultWithRule()
51 new Rule( in createAllowResultWithRule()
54 Rule.FORCE_ALLOW); in createAllowResultWithRule()
69 Rule failedRule = in createDenyResultWithRule()
70 new Rule( in createDenyResultWithRule()
73 Rule.DENY); in createDenyResultWithRule()
88 Rule failedRule = in isDenyCausedByAppCertificate()
89 new Rule( in isDenyCausedByAppCertificate()
97 Rule.DENY); in isDenyCausedByAppCertificate()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/
DIntegrityFileManagerTest.java28 import android.content.integrity.Rule;
115 Rule packageNameRule = getPackageNameIndexedRule(packageName); in testGetRules()
116 Rule packageCertRule = getAppCertificateIndexedRule(packageCert); in testGetRules()
117 Rule versionCodeRule = in testGetRules()
118 new Rule( in testGetRules()
121 Rule.DENY); in testGetRules()
122 Rule randomRule = in testGetRules()
123 new Rule( in testGetRules()
135 Rule.DENY); in testGetRules()
137 List<Rule> rules = in testGetRules()
[all …]
DAppIntegrityManagerServiceImplTest.java55 import android.content.integrity.Rule;
135 @org.junit.Rule public MockitoRule mMockitoRule = MockitoJUnit.rule();
204 Rule rule = in updateRuleSet_notAuthorized()
205 new Rule( in updateRuleSet_notAuthorized()
207 Rule.DENY); in updateRuleSet_notAuthorized()
223 Rule rule = in updateRuleSet_notSystemApp()
224 new Rule( in updateRuleSet_notSystemApp()
226 Rule.DENY); in updateRuleSet_notSystemApp()
242 Rule rule = in updateRuleSet_authorized()
243 new Rule( in updateRuleSet_authorized()
[all …]
/frameworks/base/core/java/android/content/integrity/
DRule.java43 public final class Rule implements Parcelable { class
66 public Rule(@NonNull IntegrityFormula formula, @Effect int effect) { in Rule() method in Rule
72 Rule(Parcel in) { in Rule() method in Rule
78 public static final Creator<Rule> CREATOR =
79 new Creator<Rule>() {
81 public Rule createFromParcel(Parcel in) {
82 return new Rule(in);
86 public Rule[] newArray(int size) {
87 return new Rule[size];
124 Rule that = (Rule) o; in equals()
DRuleSet.java35 private final List<Rule> mRules;
37 private RuleSet(String version, List<Rule> rules) { in RuleSet()
50 public List<Rule> getRules() { in getRules()
57 private List<Rule> mRules;
75 public Builder addRules(@NonNull List<Rule> rules) { in addRules()
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/parser/
DRuleBinaryParserTest.java40 import android.content.integrity.Rule;
88 private static final String DENY = getBits(Rule.DENY, EFFECT_BITS);
123 Rule expectedRule = in testBinaryStream_validCompoundFormula_noIndexing()
124 new Rule( in testBinaryStream_validCompoundFormula_noIndexing()
132 Rule.DENY); in testBinaryStream_validCompoundFormula_noIndexing()
134 List<Rule> rules = in testBinaryStream_validCompoundFormula_noIndexing()
162 Rule expectedRule = in testBinaryString_validCompoundFormula_notConnector_noIndexing()
163 new Rule( in testBinaryString_validCompoundFormula_notConnector_noIndexing()
171 Rule.DENY); in testBinaryString_validCompoundFormula_notConnector_noIndexing()
173 List<Rule> rules = binaryParser.parse(rule.array()); in testBinaryString_validCompoundFormula_notConnector_noIndexing()
[all …]
/frameworks/base/services/core/java/com/android/server/integrity/engine/
DRuleEvaluator.java19 import static android.content.integrity.Rule.DENY;
20 import static android.content.integrity.Rule.FORCE_ALLOW;
24 import android.content.integrity.Rule;
50 List<Rule> rules, AppInstallMetadata appInstallMetadata) { in evaluateRules()
53 List<Rule> matchedRules = in evaluateRules()
59 List<Rule> matchedPowerAllowRules = in evaluateRules()
69 List<Rule> matchedDenyRules = in evaluateRules()
/frameworks/base/services/core/java/com/android/server/firewall/
DIntentFirewall.java170 List<Rule> candidateRules; in checkIntent()
174 candidateRules = new ArrayList<Rule>(); in checkIntent()
181 Rule rule = candidateRules.get(i); in checkIntent()
320 List<List<Rule>> rulesByType = new ArrayList<List<Rule>>(3); in readRules()
322 rulesByType.add(new ArrayList<Rule>()); in readRules()
354 Rule rule = new Rule(); in readRules()
356 List<Rule> rules = rulesByType.get(ruleType); in readRules()
387 List<Rule> rules = rulesByType.get(ruleType); in readRules()
391 Rule rule = rules.get(ruleIndex); in readRules()
431 private static class Rule extends AndFilter { class in IntentFirewall
[all …]
/frameworks/base/services/core/java/com/android/server/integrity/model/
DIntegrityCheckResult.java20 import android.content.integrity.Rule;
42 private final List<Rule> mRuleList;
44 private IntegrityCheckResult(Effect effect, @Nullable List<Rule> ruleList) { in IntegrityCheckResult()
53 public List<Rule> getMatchedRules() { in getMatchedRules()
71 public static IntegrityCheckResult allow(List<Rule> ruleList) { in allow()
81 public static IntegrityCheckResult deny(List<Rule> ruleList) { in deny()
/frameworks/libs/modules-utils/java/com/android/modules/utils/
DBytesMatcher.java50 private final ArrayList<Rule> mRules = new ArrayList<>();
52 private static class Rule { class in BytesMatcher
57 public Rule(char type, @NonNull byte[] value, @Nullable byte[] mask) { in Rule() method in BytesMatcher.Rule
127 mRules.add(new Rule(TYPE_EXACT_ACCEPT, value, mask)); in addExactAcceptRule()
144 mRules.add(new Rule(TYPE_EXACT_REJECT, value, mask)); in addExactRejectRule()
161 mRules.add(new Rule(TYPE_PREFIX_ACCEPT, value, mask)); in addPrefixAcceptRule()
178 mRules.add(new Rule(TYPE_PREFIX_REJECT, value, mask)); in addPrefixRejectRule()
197 final Rule rule = mRules.get(i); in test()
228 final Rule rule = matcher.mRules.get(i); in encode()
/frameworks/base/services/core/java/com/android/server/integrity/parser/
DRuleBinaryParser.java41 import android.content.integrity.Rule;
55 public List<Rule> parse(byte[] ruleBytes) throws RuleParseException { in parse()
60 public List<Rule> parse(RandomAccessObject randomAccessObject, List<RuleIndexRange> indexRanges) in parse()
70 private List<Rule> parseRules( in parseRules()
82 private List<Rule> parseAllRules(RandomAccessInputStream randomAccessInputStream) in parseAllRules()
84 List<Rule> parsedRules = new ArrayList<>(); in parseAllRules()
97 private List<Rule> parseIndexedRules( in parseIndexedRules()
100 List<Rule> parsedRules = new ArrayList<>(); in parseIndexedRules()
123 private Rule parseRule(BitInputStream bitInputStream) throws IOException { in parseRule()
131 return new Rule(formula, effect); in parseRule()
DRuleParser.java19 import android.content.integrity.Rule;
27 List<Rule> parse(byte[] ruleBytes) throws RuleParseException; in parse()
30 List<Rule> parse(RandomAccessObject randomAccessObject, List<RuleIndexRange> ruleIndexRanges) in parse()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DSystemServiceTestsBase.java29 import org.junit.Rule;
35 @Rule(order = 0)
39 @Rule(order = 1)
42 @Rule(order = 2)
46 @Rule

12345678910>>...61