/frameworks/base/tools/split-select/ |
D | TestRules.h | 27 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 …]
|
D | TestRules.cpp | 27 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 …]
|
D | RuleGenerator.cpp | 35 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 …]
|
D | Rule_test.cpp | 33 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 …]
|
D | RuleGenerator_test.cpp | 37 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 …]
|
D | Rule.h | 29 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
|
D | SplitSelector_test.cpp | 56 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()
|
D | Rule.cpp | 32 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()
|
D | RuleGenerator.h | 31 …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);
|
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/engine/ |
D | RuleEvaluatorTest.java | 29 import android.content.integrity.Rule; 57 List<Rule> rules = new ArrayList<>(); in testEvaluateRules_noRules_allow() 66 Rule rule = in testEvaluateRules_noMatchedRules_allow() 67 new Rule( in testEvaluateRules_noMatchedRules_allow() 72 Rule.DENY); in testEvaluateRules_noMatchedRules_allow() 82 Rule rule1 = in testEvaluateRules_oneMatch_deny() 83 new Rule( in testEvaluateRules_oneMatch_deny() 88 Rule.DENY); in testEvaluateRules_oneMatch_deny() 89 Rule rule2 = in testEvaluateRules_oneMatch_deny() 90 new Rule( in testEvaluateRules_oneMatch_deny() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/serializer/ |
D | RuleIndexingDetailsIdentifierTest.java | 31 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 …]
|
D | RuleBinarySerializerTest.java | 47 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/ |
D | RuleTest.java | 34 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/ |
D | IntegrityCheckResultTest.java | 23 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/ |
D | IntegrityFileManagerTest.java | 28 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 …]
|
D | AppIntegrityManagerServiceImplTest.java | 55 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/ |
D | Rule.java | 43 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()
|
D | RuleSet.java | 35 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/ |
D | RuleBinaryParserTest.java | 40 import android.content.integrity.Rule; 86 private static final String DENY = getBits(Rule.DENY, EFFECT_BITS); 121 Rule expectedRule = in testBinaryStream_validCompoundFormula_noIndexing() 122 new Rule( in testBinaryStream_validCompoundFormula_noIndexing() 130 Rule.DENY); in testBinaryStream_validCompoundFormula_noIndexing() 132 List<Rule> rules = in testBinaryStream_validCompoundFormula_noIndexing() 160 Rule expectedRule = in testBinaryString_validCompoundFormula_notConnector_noIndexing() 161 new Rule( in testBinaryString_validCompoundFormula_notConnector_noIndexing() 169 Rule.DENY); in testBinaryString_validCompoundFormula_notConnector_noIndexing() 171 List<Rule> rules = binaryParser.parse(rule.array()); in testBinaryString_validCompoundFormula_notConnector_noIndexing() [all …]
|
/frameworks/base/services/core/java/com/android/server/integrity/engine/ |
D | RuleEvaluator.java | 19 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/ |
D | IntentFirewall.java | 156 List<Rule> candidateRules; in checkIntent() 159 candidateRules = new ArrayList<Rule>(); in checkIntent() 166 Rule rule = candidateRules.get(i); in checkIntent() 305 List<List<Rule>> rulesByType = new ArrayList<List<Rule>>(3); in readRules() 307 rulesByType.add(new ArrayList<Rule>()); in readRules() 339 Rule rule = new Rule(); in readRules() 341 List<Rule> rules = rulesByType.get(ruleType); in readRules() 372 List<Rule> rules = rulesByType.get(ruleType); in readRules() 376 Rule rule = rules.get(ruleIndex); in readRules() 416 private static class Rule extends AndFilter { class in IntentFirewall [all …]
|
/frameworks/base/services/core/java/com/android/server/integrity/model/ |
D | IntegrityCheckResult.java | 20 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/base/core/java/android/os/ |
D | BytesMatcher.java | 53 private final ArrayList<Rule> mRules = new ArrayList<>(); 55 private static class Rule { class in BytesMatcher 60 public Rule(char type, @NonNull byte[] value, @Nullable byte[] mask) { in Rule() method in BytesMatcher.Rule 130 mRules.add(new Rule(TYPE_EXACT_ACCEPT, value, mask)); in addExactAcceptRule() 147 mRules.add(new Rule(TYPE_EXACT_REJECT, value, mask)); in addExactRejectRule() 164 mRules.add(new Rule(TYPE_PREFIX_ACCEPT, value, mask)); in addPrefixAcceptRule() 181 mRules.add(new Rule(TYPE_PREFIX_REJECT, value, mask)); in addPrefixRejectRule() 216 final Rule rule = mRules.get(i); in test() 247 final Rule rule = matcher.mRules.get(i); in encode()
|
/frameworks/base/services/core/java/com/android/server/integrity/parser/ |
D | RuleBinaryParser.java | 41 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()
|
D | RuleParser.java | 19 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()
|