Home
last modified time | relevance | path

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

12345678910>>...20

/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()
/frameworks/base/services/core/java/com/android/server/notification/
DZenModeConditions.java129 private void evaluateRule(ZenRule rule, ArraySet<Uri> current, ComponentName trigger, in evaluateRule() argument
131 if (rule == null || rule.conditionId == null) return; in evaluateRule()
132 if (rule.configurationActivity != null) return; in evaluateRule()
133 final Uri id = rule.conditionId; in evaluateRule()
138 rule.component = sp.getComponent(); in evaluateRule()
144 final IConditionProvider cp = mConditionProviders.findConditionProvider(rule.component); in evaluateRule()
147 mConditionProviders.ensureRecordExists(rule.component, id, cp); in evaluateRule()
151 if (rule.component == null && rule.enabler == null) { in evaluateRule()
152 Log.w(TAG, "No component found for automatic rule: " + rule.conditionId); in evaluateRule()
153 rule.enabled = false; in evaluateRule()
[all …]
DZenModeHelper.java324 for (ZenRule rule : mConfig.automaticRules.values()) { in getZenRules()
325 if (canManageAutomaticZenRule(rule)) { in getZenRules()
326 rules.add(rule); in getZenRules()
334 ZenRule rule; in getAutomaticZenRule() local
337 rule = mConfig.automaticRules.get(id); in getAutomaticZenRule()
339 if (rule == null) return null; in getAutomaticZenRule()
340 if (canManageAutomaticZenRule(rule)) { in getAutomaticZenRule()
341 return createAutomaticZenRule(rule); in getAutomaticZenRule()
380 ZenRule rule = new ZenRule(); in addAutomaticZenRule() local
381 populateZenRule(pkg, automaticZenRule, rule, true); in addAutomaticZenRule()
[all …]
/frameworks/base/media/java/android/media/audiopolicy/
DAudioMixingRule.java142 AudioMixMatchCriterion(AudioAttributes attributes, int rule) { in AudioMixMatchCriterion() argument
145 mRule = rule; in AudioMixMatchCriterion()
148 AudioMixMatchCriterion(Integer intProp, int rule) { in AudioMixMatchCriterion() argument
151 mRule = rule; in AudioMixMatchCriterion()
326 private static boolean isValidSystemApiRule(int rule) { in isValidSystemApiRule() argument
328 switch (rule) { in isValidSystemApiRule()
339 private static boolean isValidAttributesSystemApiRule(int rule) { in isValidAttributesSystemApiRule() argument
341 switch (rule) { in isValidAttributesSystemApiRule()
350 private static boolean isValidRule(int rule) { in isValidRule() argument
351 final int match_rule = rule & ~RULE_EXCLUSION_MASK; in isValidRule()
[all …]
/frameworks/opt/telephony/
Djarjar-rules-shared.txt1 rule android.net.NetworkFactory* com.android.internal.telephony.NetworkFactory@1
2 rule com.android.modules.utils.** com.android.internal.telephony.@1
3 rule android.os.RegistrantList* com.android.internal.telephony.RegistrantList@1
4 rule android.os.Registrant* com.android.internal.telephony.Registrant@1
5 rule android.hidl.** android.internal.hidl.@1
6 rule android.sysprop.** android.internal.telephony.sysprop.@1
7 rule android.util.IndentingPrintWriter* com.android.internal.telephony.AndroidUtilIndentingPrintWri…
8 rule android.util.LocalLog* com.android.internal.telephony.LocalLog@1
9 rule android.util.TimeUtils* com.android.internal.telephony.TimeUtils@1
10 rule com.android.internal.os.SomeArgs* com.android.internal.telephony.SomeArgs@1
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
DPackageManagerServiceBootTest.kt48 val rule = MockSystemRule() in <lambda>() constant
54 rule.system().stageNominalSystemState() in <lambda>()
58 return PackageManagerService(rule.mocks().injector, in <lambda>()
71 verify(rule.mocks().injector).bootstrap(pm) in <lambda>()
72 verify(rule.mocks().settings).addSharedUserLPw("android.uid.system", in <lambda>()
74 verify(rule.mocks().settings).addSharedUserLPw("android.uid.phone", in <lambda>()
76 verify(rule.mocks().settings).addSharedUserLPw("android.uid.log", in <lambda>()
78 verify(rule.mocks().settings).addSharedUserLPw("android.uid.nfc", in <lambda>()
80 verify(rule.mocks().settings).addSharedUserLPw("android.uid.bluetooth", in <lambda>()
82 verify(rule.mocks().settings).addSharedUserLPw("android.uid.shell", in <lambda>()
[all …]
DPackageManagerServiceHibernationTests.kt57 val rule = MockSystemRule() constant
71 rule.system().stageNominalSystemState() in setup()
72 whenever(rule.mocks().injector.getLocalService(AppHibernationManagerInternal::class.java)) in setup()
74 whenever(rule.mocks().injector.handler) in setup()
87 rule.mocks().installer, in setup()
88 rule.mocks().installLock, in setup()
89 rule.mocks().context, in setup()
91 whenever(rule.mocks().injector.packageDexOptimizer) in setup()
98 rule.system().stageScanExistingPackage( in testExitForceStopExitsHibernation()
101 rule.system().dataAppDirectory) in testExitForceStopExitsHibernation()
[all …]
DInitAppsHelperTest.kt35 val rule = MockSystemRule() constant
39 rule.system().stageNominalSystemState() in setUp()
44 rule.system().stageScanExistingPackage("a.data.package", 1L, in mockNoFirstBoot()
45 rule.system().dataAppDirectory) in mockNoFirstBoot()
51 whenever(rule.mocks().settings.internalVersion) { in mockFingerprintChanged()
60 whenever(rule.mocks().settings.internalVersion) { in mockFingerprintUnchanged()
72 return spy(PackageManagerService(rule.mocks().injector, in createPackageManagerService()
86 val initAppsHelper = InitAppsHelper(pms, rule.mocks().apexManager, null, in testSystemScanFlagOnFirstBoot()
101 val initAppsHelper = InitAppsHelper(pms, rule.mocks().apexManager, null, in testSystemScanFlagWithMockOTA()
115 val initAppsHelper = InitAppsHelper(pms, rule.mocks().apexManager, null, in testSystemScanFlagNoOTA()
[all …]
DPackageHelperTestBase.kt75 val rule = MockSystemRule() constant
82 rule.system().stageNominalSystemState() in setup()
87 suspendPackageHelper = SuspendPackageHelper(pms, rule.mocks().injector, in setup()
88 rule.mocks().userManagerService, broadcastHelper, protectedPackages) in setup()
89 defaultAppProvider = rule.mocks().defaultAppProvider in setup()
90 testHandler = rule.mocks().handler in setup()
100 whenever(rule.mocks().userManagerService.hasUserRestriction( in setup()
102 whenever(rule.mocks().userManagerService.hasUserRestriction( in setup()
130 rule.system().stageScanExistingPackage(it, 1L, in createPackageManagerService()
131 rule.system().dataAppDirectory) in createPackageManagerService()
[all …]
/frameworks/base/services/core/java/com/android/server/policy/
DKeyCombinationManager.java135 void addRule(TwoKeysCombinationRule rule) { in addRule() argument
136 if (mRules.contains(rule)) { in addRule()
137 throw new IllegalArgumentException("Rule : " + rule + " already exists."); in addRule()
139 mRules.add(rule); in addRule()
142 void removeRule(TwoKeysCombinationRule rule) { in removeRule() argument
143 mRules.remove(rule); in removeRule()
168 forAllRules(mActiveRules, (rule)-> rule.cancel()); in interceptKeyLocked()
186 forAllRules(mRules, (rule)-> { in interceptKeyLocked()
187 if (rule.shouldInterceptKey(keyCode)) { in interceptKeyLocked()
188 mActiveRules.add(rule); in interceptKeyLocked()
[all …]
DSingleKeyGestureDetector.java186 void addRule(SingleKeyRule rule) { in addRule() argument
187 if (mRules.contains(rule)) { in addRule()
188 throw new IllegalArgumentException("Rule : " + rule + " already exists."); in addRule()
190 mRules.add(rule); in addRule()
193 void removeRule(SingleKeyRule rule) { in removeRule() argument
194 mRules.remove(rule); in removeRule()
243 final SingleKeyRule rule = mRules.get(index); in interceptKeyDown() local
244 if (rule.shouldInterceptKey(keyCode)) { in interceptKeyDown()
246 Log.i(TAG, "Intercept key by rule " + rule); in interceptKeyDown()
248 mActiveRule = rule; in interceptKeyDown()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/parser/
DRuleBinaryParserTest.java118 ByteBuffer rule = in testBinaryStream_validCompoundFormula_noIndexing() local
120 rule.put(DEFAULT_FORMAT_VERSION_BYTES); in testBinaryStream_validCompoundFormula_noIndexing()
121 rule.put(ruleBytes); in testBinaryStream_validCompoundFormula_noIndexing()
135 binaryParser.parse(RandomAccessObject.ofBytes(rule.array()), NO_INDEXING); in testBinaryStream_validCompoundFormula_noIndexing()
157 ByteBuffer rule = in testBinaryString_validCompoundFormula_notConnector_noIndexing() local
159 rule.put(DEFAULT_FORMAT_VERSION_BYTES); in testBinaryString_validCompoundFormula_notConnector_noIndexing()
160 rule.put(ruleBytes); in testBinaryString_validCompoundFormula_notConnector_noIndexing()
173 List<Rule> rules = binaryParser.parse(rule.array()); in testBinaryString_validCompoundFormula_notConnector_noIndexing()
202 ByteBuffer rule = in testBinaryString_validCompoundFormula_andConnector_noIndexing() local
204 rule.put(DEFAULT_FORMAT_VERSION_BYTES); in testBinaryString_validCompoundFormula_andConnector_noIndexing()
[all …]
/frameworks/base/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/scaffold/
DCustomizedAppBarTest.kt74 val rule = createComposeRule() in <lambda>() constant in com.android.settingslib.spa.widget.scaffold.CustomizedAppBarTest
78 rule in <lambda>()
83 .assertWidthIsEqualTo(rule.rootWidth()) in <lambda>()
89 rule.setContent { in <lambda>()
94 rule.onNodeWithText(title).assertIsDisplayed() in <lambda>()
99 rule.setContent { in <lambda>()
119 rule.setContent { in <lambda>()
138 rule.setContent { in <lambda>()
160 rule.setContent { in <lambda>()
217 rule.setContent { in <lambda>()
[all …]
/frameworks/base/apex/jobscheduler/service/
Djarjar-rules.txt6 rule com.android.internal.util.ArrayUtils* com.android.internal.util.jobs.ArrayUtils@1
7 rule com.android.internal.util.BitUtils* com.android.internal.util.jobs.BitUtils@1
8 rule com.android.internal.util.CollectionUtils* com.android.internal.util.jobs.CollectionUtils@1
9 rule com.android.internal.util.ConcurrentUtils* com.android.internal.util.jobs.ConcurrentUtils@1
10 rule com.android.internal.util.DumpUtils* com.android.internal.util.jobs.DumpUtils@1
11 rule com.android.internal.util.FastPrintWriter* com.android.internal.util.jobs.FastPrintWriter@1
12 rule com.android.internal.util.FastXmlSerializer* com.android.internal.util.jobs.FastXmlSerializer@1
13 rule com.android.internal.util.FunctionalUtils* com.android.internal.util.jobs.FunctionalUtils@1
14 rule com.android.internal.util.ParseUtils* com.android.internal.util.jobs.ParseUtils@1
15 rule com.android.internal.util.Preconditions* com.android.internal.util.jobs.Preconditions@1
[all …]
/frameworks/base/packages/SystemUI/compose/core/tests/src/com/android/compose/animation/scene/
DSceneTransitionLayoutTest.kt69 @get:Rule val rule = createAndroidComposeRule<ComponentActivity>() constant in com.android.compose.animation.scene.SceneTransitionLayoutTest
139 rule.setContent { TestContent() } in testOnlyCurrentSceneIsDisplayed()
142 rule.onNodeWithText("SceneA").assertIsDisplayed() in testOnlyCurrentSceneIsDisplayed()
143 rule.onNodeWithText("SceneB").assertDoesNotExist() in testOnlyCurrentSceneIsDisplayed()
144 rule.onNodeWithText("SceneC").assertDoesNotExist() in testOnlyCurrentSceneIsDisplayed()
150 rule.onNodeWithText("SceneA").assertDoesNotExist() in testOnlyCurrentSceneIsDisplayed()
151 rule.onNodeWithText("SceneB").assertIsDisplayed() in testOnlyCurrentSceneIsDisplayed()
152 rule.onNodeWithText("SceneC").assertDoesNotExist() in testOnlyCurrentSceneIsDisplayed()
159 rule.setContent { TestContent() } in testBack()
163 rule.activity.onBackPressed() in testBack()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DZenModeConfigTest.java206 ZenModeConfig.ZenRule rule = new ZenModeConfig.ZenRule(); in testRuleXml() local
207 rule.configurationActivity = new ComponentName("a", "a"); in testRuleXml()
208 rule.component = new ComponentName("b", "b"); in testRuleXml()
209 rule.conditionId = new Uri.Builder().scheme("hello").build(); in testRuleXml()
210 rule.condition = new Condition(rule.conditionId, "", Condition.STATE_TRUE); in testRuleXml()
211 rule.enabled = true; in testRuleXml()
212 rule.creationTime = 123; in testRuleXml()
213 rule.id = "id"; in testRuleXml()
214 rule.zenMode = Settings.Global.ZEN_MODE_ALARMS; in testRuleXml()
215 rule.modified = true; in testRuleXml()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/
DAutomaticZenRuleTest.java82 AutomaticZenRule rule = new AutomaticZenRule( in testLongFields_inSetters() local
89 rule.setName(longString); in testLongFields_inSetters()
90 rule.setConditionId(longUri); in testLongFields_inSetters()
91 rule.setConfigurationActivity(new ComponentName(longString, longString)); in testLongFields_inSetters()
93 assertEquals(AutomaticZenRule.MAX_STRING_LENGTH, rule.getName().length()); in testLongFields_inSetters()
95 rule.getConditionId().toString().length()); in testLongFields_inSetters()
97 rule.getConfigurationActivity().getPackageName().length()); in testLongFields_inSetters()
99 rule.getConfigurationActivity().getClassName().length()); in testLongFields_inSetters()
106 AutomaticZenRule rule = new AutomaticZenRule( in testLongInputsFromParcel() local
118 name.set(rule, longString); in testLongInputsFromParcel()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/engine/
DRuleEvaluatorTest.java67 Rule rule = in testEvaluateRules_noMatchedRules_allow() local
76 RuleEvaluator.evaluateRules(Collections.singletonList(rule), APP_INSTALL_METADATA); in testEvaluateRules_noMatchedRules_allow()
137 Rule rule = new Rule( in testEvaluateRules_ruleWithNot_deny() local
148 RuleEvaluator.evaluateRules(Collections.singletonList(rule), APP_INSTALL_METADATA); in testEvaluateRules_ruleWithNot_deny()
151 assertThat(result.getMatchedRules()).containsExactly(rule); in testEvaluateRules_ruleWithNot_deny()
156 Rule rule = in testEvaluateRules_ruleWithIntegerOperators_deny() local
163 RuleEvaluator.evaluateRules(Collections.singletonList(rule), APP_INSTALL_METADATA); in testEvaluateRules_ruleWithIntegerOperators_deny()
166 assertThat(result.getMatchedRules()).containsExactly(rule); in testEvaluateRules_ruleWithIntegerOperators_deny()
171 Rule rule = new Rule( in testEvaluateRules_validForm_deny() local
186 RuleEvaluator.evaluateRules(Collections.singletonList(rule), APP_INSTALL_METADATA); in testEvaluateRules_validForm_deny()
[all …]
/frameworks/base/tools/aapt2/java/
DAnnotationProcessor.cpp72 for (const AnnotationRule& rule : sAnnotationRules) { in AppendCommentLine() local
73 std::string::size_type idx = comment.find(rule.doc_str.data()); in AppendCommentLine()
77 std::regex re(std::string(rule.doc_str) += "\\s*\\((.+)\\)"); in AppendCommentLine()
81 if (is_match && rule.bit_mask == AnnotationRule::kSystemApi) { in AppendCommentLine()
82 annotation_parameter_map_[rule.bit_mask] = match_result[1].str(); in AppendCommentLine()
86 annotation_parameter_map_[rule.bit_mask] = ""; in AppendCommentLine()
87 comment.erase(comment.begin() + idx, comment.begin() + idx + rule.doc_str.size()); in AppendCommentLine()
143 for (const AnnotationRule& rule : sAnnotationRules) { in Print() local
144 const auto& it = annotation_parameter_map_.find(rule.bit_mask); in Print()
146 printer->Print(rule.annotation); in Print()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/data/
DDataRetryManagerTest.java191 DataSetupRetryRule rule = new DataSetupRetryRule(ruleString); in testDataSetupRetryRulesParsingFromString() local
192 assertThat(rule.getNetworkCapabilities()).containsExactly( in testDataSetupRetryRulesParsingFromString()
194 assertThat(rule.getMaxRetries()).isEqualTo(10); in testDataSetupRetryRulesParsingFromString()
195 assertThat(rule.getFailCauses()).isEmpty(); in testDataSetupRetryRulesParsingFromString()
196 assertThat(rule.getRetryIntervalsMillis()).containsExactly(1000L); in testDataSetupRetryRulesParsingFromString()
200 rule = new DataSetupRetryRule(ruleString); in testDataSetupRetryRulesParsingFromString()
201 assertThat(rule.getNetworkCapabilities()).isEmpty(); in testDataSetupRetryRulesParsingFromString()
202 assertThat(rule.getMaxRetries()).isEqualTo(0); in testDataSetupRetryRulesParsingFromString()
203 assertThat(rule.getFailCauses()).containsExactly(8, 27, 28, 29, 30, 32, 33, 35, 50, in testDataSetupRetryRulesParsingFromString()
209 rule = new DataSetupRetryRule(ruleString); in testDataSetupRetryRulesParsingFromString()
[all …]
/frameworks/base/services/core/java/com/android/server/integrity/engine/
DRuleEvaluator.java55 .filter(rule -> rule.getFormula().matches(appInstallMetadata)) in evaluateRules()
61 .filter(rule -> rule.getEffect() == FORCE_ALLOW) in evaluateRules()
71 .filter(rule -> rule.getEffect() == DENY) in evaluateRules()
/frameworks/base/media/tests/AudioPolicyTest/src/com/android/audiopolicytest/
DAudioMixingRuleUnitTests.java70 AudioMixingRule rule = new AudioMixingRule.Builder() in testConstructValidRule() local
78 assertEquals(rule.getTargetMixRole(), MIX_ROLE_PLAYERS); in testConstructValidRule()
79 assertThat(rule.getCriteria(), containsInAnyOrder( in testConstructValidRule()
98 AudioMixingRule rule = new AudioMixingRule.Builder() in testRuleBuilderDedupsCriteria() local
107 assertThat(rule.getCriteria(), hasSize(2)); in testRuleBuilderDedupsCriteria()
108 assertThat(rule.getCriteria(), containsInAnyOrder( in testRuleBuilderDedupsCriteria()
153 AudioMixingRule rule = new AudioMixingRule.Builder() in injectorMixTypeDeductionWithGenericRuleSucceeds() local
162 assertEquals(rule.getTargetMixRole(), MIX_ROLE_INJECTOR); in injectorMixTypeDeductionWithGenericRuleSucceeds()
163 assertThat(rule.getCriteria(), containsInAnyOrder( in injectorMixTypeDeductionWithGenericRuleSucceeds()
194 AudioMixingRule rule = new AudioMixingRule.Builder() in sessionIdRuleCompatibleWithPlayersMix() local
[all …]
/frameworks/base/
Dframework-jarjar-rules.txt1 # This rule is meant to be reused across libraries in the bootclasspath that depend
3 rule android.hidl.** android.internal.hidl.@1
6 rule android.net.wifi.WifiAnnotations* android.internal.wifi.WifiAnnotations@1
7 rule com.android.server.vcn.util.** com.android.server.vcn.repackaged.util.@1
10 rule com.android.modules.utils.build.** android.internal.modules.utils.build.@1

12345678910>>...20