Home
last modified time | relevance | path

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

12345678910>>...23

/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 …]
/frameworks/base/nfc/
Djarjar-rules.txt2 rule android.app.PendingIntentProto* com.android.nfc.x.@0
3 rule android.content.ComponentNameProto* com.android.nfc.x.@0
4 rule android.content.IntentProto* com.android.nfc.x.@0
5 rule android.content.IntentFilterProto* com.android.nfc.x.@0
6 rule android.content.AuthorityEntryProto* com.android.nfc.x.@0
7 rule android.content.UriRelativeFilter* com.android.nfc.x.@0
8 rule android.nfc.cardemulation.AidGroupProto* com.android.nfc.x.@0
9 rule android.nfc.cardemulation.ApduServiceInfoProto* com.android.nfc.x.@0
10 rule android.nfc.cardemulation.NfcFServiceInfoProto* com.android.nfc.x.@0
11 rule android.nfc.NdefMessageProto* com.android.nfc.x.@0
[all …]
/frameworks/base/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/
DSceneTransitionLayoutTest.kt76 @get:Rule val rule = createAndroidComposeRule<ComponentActivity>() constant in com.android.compose.animation.scene.SceneTransitionLayoutTest
147 rule.setContent { TestContent() } in testOnlyCurrentSceneIsDisplayed()
150 rule.onNodeWithText("SceneA").assertIsDisplayed() in testOnlyCurrentSceneIsDisplayed()
151 rule.onNodeWithText("SceneB").assertDoesNotExist() in testOnlyCurrentSceneIsDisplayed()
152 rule.onNodeWithText("SceneC").assertDoesNotExist() in testOnlyCurrentSceneIsDisplayed()
158 rule.onNodeWithText("SceneA").assertDoesNotExist() in testOnlyCurrentSceneIsDisplayed()
159 rule.onNodeWithText("SceneB").assertIsDisplayed() in testOnlyCurrentSceneIsDisplayed()
160 rule.onNodeWithText("SceneC").assertDoesNotExist() in testOnlyCurrentSceneIsDisplayed()
167 rule.setContent { TestContent() } in testBack()
171 rule.activity.onBackPressed() in testBack()
[all …]
DMovableElementTest.kt55 @get:Rule val rule = createComposeRule() constant in com.android.compose.animation.scene.MovableElementTest
71 rule.testTransition( in modifierElementIsDuplicatedDuringTransitions()
82 rule.onNodeWithText("count: 0").assertIsDisplayed().performClick() in modifierElementIsDuplicatedDuringTransitions()
83 rule.onNodeWithText("count: 1").assertIsDisplayed().performClick() in modifierElementIsDuplicatedDuringTransitions()
84 rule.onNodeWithText("count: 2").assertIsDisplayed().performClick() in modifierElementIsDuplicatedDuringTransitions()
85 rule in modifierElementIsDuplicatedDuringTransitions()
92 rule in modifierElementIsDuplicatedDuringTransitions()
103 rule in modifierElementIsDuplicatedDuringTransitions()
111 rule in modifierElementIsDuplicatedDuringTransitions()
121 rule in modifierElementIsDuplicatedDuringTransitions()
[all …]
DElementTest.kt86 @get:Rule val rule = createComposeRule() in <lambda>() constant in com.android.compose.animation.scene.ElementTest
127 rule.testTransition( in <lambda>()
208 rule.testTransition( in <lambda>()
266 rule.testTransition( in <lambda>()
348 rule.setContent { in <lambda>()
374 rule.waitForIdle() in <lambda>()
379 rule.waitForIdle() in <lambda>()
388 rule.waitForIdle() in <lambda>()
396 rule.waitForIdle() in <lambda>()
407 rule.setContent { in <lambda>()
[all …]
DSwipeToSceneTest.kt69 @get:Rule val rule = createComposeRule() in <lambda>() constant in com.android.compose.animation.scene.SwipeToSceneTest
75 return rule.runOnUiThread { MutableSceneTransitionLayoutState(initialScene, transitions) } in <lambda>()
131 rule.setContent { in <lambda>()
141 rule.onRoot().performTouchInput { in <lambda>()
160 rule.onRoot().performTouchInput { up() } in <lambda>()
169 rule.waitForIdle() in <lambda>()
175 rule.onRoot().performTouchInput { in <lambda>()
190 rule.onRoot().performTouchInput { up() } in <lambda>()
199 rule.waitForIdle() in <lambda>()
210 rule.setContent { in <lambda>()
[all …]
DMultiPointerDraggableTest.kt50 @get:Rule val rule = createComposeRule() in <lambda>() constant in com.android.compose.animation.scene.MultiPointerDraggableTest
63 rule.setContent { in <lambda>()
88 rule.onRoot().performTouchInput { in <lambda>()
95 rule.onRoot().performTouchInput { up() } in <lambda>()
108 rule.waitForIdle() in <lambda>()
117 rule.waitForIdle() in <lambda>()
135 rule.setContent { in <lambda>()
176 rule.onRoot().performTouchInput { in <lambda>()
183 rule.onRoot().performTouchInput { moveBy(Offset(0f, touchSlop)) } in <lambda>()
187 rule.onRoot().performTouchInput { up() } in <lambda>()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DZenModeConfigTest.java457 ZenModeConfig.ZenRule rule = new ZenModeConfig.ZenRule(); in testCanBeUpdatedByApp_nullPolicyAndDeviceEffects() local
458 rule.zenPolicy = null; in testCanBeUpdatedByApp_nullPolicyAndDeviceEffects()
459 rule.zenDeviceEffects = null; in testCanBeUpdatedByApp_nullPolicyAndDeviceEffects()
460 assertThat(rule.canBeUpdatedByApp()).isTrue(); in testCanBeUpdatedByApp_nullPolicyAndDeviceEffects()
462 rule.userModifiedFields = 1; in testCanBeUpdatedByApp_nullPolicyAndDeviceEffects()
464 assertThat(rule.canBeUpdatedByApp()).isFalse(); in testCanBeUpdatedByApp_nullPolicyAndDeviceEffects()
469 ZenModeConfig.ZenRule rule = new ZenModeConfig.ZenRule(); in testCanBeUpdatedByApp_policyModified() local
470 rule.zenPolicy = new ZenPolicy(); in testCanBeUpdatedByApp_policyModified()
471 assertThat(rule.canBeUpdatedByApp()).isTrue(); in testCanBeUpdatedByApp_policyModified()
473 rule.zenPolicyUserModifiedFields = 1; in testCanBeUpdatedByApp_policyModified()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
DPackageManagerServiceBootTest.kt49 val rule = MockSystemRule() in <lambda>() constant in com.android.server.pm.PackageManagerServiceBootTest
55 rule.system().stageNominalSystemState() in <lambda>()
59 return PackageManagerService(rule.mocks().injector, in <lambda>()
72 verify(rule.mocks().injector).bootstrap(pm) in <lambda>()
73 verify(rule.mocks().settings).addSharedUserLPw("android.uid.system", in <lambda>()
75 verify(rule.mocks().settings).addSharedUserLPw("android.uid.phone", in <lambda>()
77 verify(rule.mocks().settings).addSharedUserLPw("android.uid.log", in <lambda>()
79 verify(rule.mocks().settings).addSharedUserLPw("android.uid.nfc", in <lambda>()
81 verify(rule.mocks().settings).addSharedUserLPw("android.uid.bluetooth", in <lambda>()
83 verify(rule.mocks().settings).addSharedUserLPw("android.uid.shell", in <lambda>()
[all …]
DPackageManagerServiceHibernationTests.kt57 val rule = MockSystemRule() constant in com.android.server.pm.PackageManagerServiceHibernationTests
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 …]
/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/core/java/com/android/server/notification/
DZenModeConditions.java134 private void evaluateRule(ZenRule rule, ArraySet<Uri> current, ComponentName trigger, in evaluateRule() argument
136 if (rule == null || rule.conditionId == null) return; in evaluateRule()
137 if (rule.configurationActivity != null) return; in evaluateRule()
138 final Uri id = rule.conditionId; in evaluateRule()
143 rule.component = sp.getComponent(); in evaluateRule()
149 final IConditionProvider cp = mConditionProviders.findConditionProvider(rule.component); in evaluateRule()
152 mConditionProviders.ensureRecordExists(rule.component, id, cp); in evaluateRule()
156 if (rule.component == null && rule.enabler == null) { in evaluateRule()
158 Log.w(TAG, "No component found for automatic rule: " + rule.conditionId); in evaluateRule()
159 rule.enabled = false; in evaluateRule()
[all …]
DZenModeHelper.java412 for (ZenRule rule : mConfig.automaticRules.values()) { in getZenRules()
413 if (canManageAutomaticZenRule(rule)) { in getZenRules()
414 rules.add(rule); in getZenRules()
429 for (ZenRule rule : ruleList) { in getAutomaticZenRules()
430 rules.put(rule.id, zenRuleToAutomaticZenRule(rule)); in getAutomaticZenRules()
436 ZenRule rule; in getAutomaticZenRule() local
439 rule = mConfig.automaticRules.get(id); in getAutomaticZenRule()
441 if (rule == null) return null; in getAutomaticZenRule()
442 if (canManageAutomaticZenRule(rule)) { in getAutomaticZenRule()
443 return zenRuleToAutomaticZenRule(rule); in getAutomaticZenRule()
[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.java202 void addRule(SingleKeyRule rule) { in addRule() argument
203 if (mRules.contains(rule)) { in addRule()
204 throw new IllegalArgumentException("Rule : " + rule + " already exists."); in addRule()
206 mRules.add(rule); in addRule()
209 void removeRule(SingleKeyRule rule) { in removeRule() argument
210 mRules.remove(rule); in removeRule()
261 final SingleKeyRule rule = mRules.get(index); in interceptKeyDown() local
262 if (rule.shouldInterceptKey(keyCode)) { in interceptKeyDown()
264 Log.i(TAG, "Intercept key by rule " + rule); in interceptKeyDown()
266 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/media/java/android/media/audiopolicy/
DAudioMixingRule.java146 public AudioMixMatchCriterion(AudioAttributes attributes, int rule) { in AudioMixMatchCriterion() argument
149 mRule = rule; in AudioMixMatchCriterion()
153 public AudioMixMatchCriterion(Integer intProp, int rule) { in AudioMixMatchCriterion() argument
156 mRule = rule; in AudioMixMatchCriterion()
377 private static boolean isValidSystemApiRule(int rule) { in isValidSystemApiRule() argument
379 switch (rule) { in isValidSystemApiRule()
390 private static boolean isValidAttributesSystemApiRule(int rule) { in isValidAttributesSystemApiRule() argument
392 switch (rule) { in isValidAttributesSystemApiRule()
401 private static boolean isValidRule(int rule) { in isValidRule() argument
402 final int match_rule = rule & ~RULE_EXCLUSION_MASK; in isValidRule()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/
DAutomaticZenRuleTest.java94 AutomaticZenRule rule = new AutomaticZenRule( in testLongFields_inSetters() local
101 rule.setName(longString); in testLongFields_inSetters()
102 rule.setConditionId(longUri); in testLongFields_inSetters()
103 rule.setConfigurationActivity(new ComponentName(longString, longString)); in testLongFields_inSetters()
105 assertEquals(AutomaticZenRule.MAX_STRING_LENGTH, rule.getName().length()); in testLongFields_inSetters()
107 rule.getConditionId().toString().length()); in testLongFields_inSetters()
109 rule.getConfigurationActivity().getPackageName().length()); in testLongFields_inSetters()
111 rule.getConfigurationActivity().getClassName().length()); in testLongFields_inSetters()
119 AutomaticZenRule rule = new AutomaticZenRule( in testLongInputsFromParcel() local
131 name.set(rule, longString); in testLongInputsFromParcel()
[all …]
/frameworks/base/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/scaffold/
DCustomizedAppBarTest.kt75 val rule = createComposeRule() in <lambda>() constant in com.android.settingslib.spa.widget.scaffold.CustomizedAppBarTest
79 rule in <lambda>()
84 .assertWidthIsEqualTo(rule.rootWidth()) in <lambda>()
90 rule.setContent { in <lambda>()
95 rule.onNodeWithText(title).assertIsDisplayed() in <lambda>()
100 rule.setContent { in <lambda>()
120 rule.setContent { in <lambda>()
139 rule.setContent { in <lambda>()
161 rule.setContent { in <lambda>()
218 rule.setContent { in <lambda>()
[all …]
/frameworks/base/core/java/android/service/notification/
DSystemZenRules.java51 for (ZenRule rule : config.automaticRules.values()) { in maybeUpgradeRules()
52 if (isSystemOwnedRule(rule)) { in maybeUpgradeRules()
53 if (rule.type == AutomaticZenRule.TYPE_UNKNOWN) { in maybeUpgradeRules()
54 upgradeSystemProviderRule(context, rule); in maybeUpgradeRules()
57 rule.allowManualInvocation = true; in maybeUpgradeRules()
67 public static boolean isSystemOwnedRule(ZenRule rule) { in isSystemOwnedRule() argument
68 return PACKAGE_ANDROID.equals(rule.pkg); in isSystemOwnedRule()
72 private static void upgradeSystemProviderRule(Context context, ZenRule rule) { in upgradeSystemProviderRule() argument
73 ScheduleInfo scheduleInfo = ZenModeConfig.tryParseScheduleConditionId(rule.conditionId); in upgradeSystemProviderRule()
75 rule.type = AutomaticZenRule.TYPE_SCHEDULE_TIME; in upgradeSystemProviderRule()
[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/ravenwood/junit-impl-src/android/platform/test/ravenwood/
DRavenwoodRuleImpl.java89 public static void init(RavenwoodRule rule) { in init() argument
97 android.os.Process.init$ravenwood(rule.mUid, rule.mPid); in init()
103 setSystemProperties(rule.mSystemProperties); in init()
108 ActivityManager.init$ravenwood(rule.mCurrentUser); in init()
111 if (rule.mProvideMainThread) { in init()
119 rule.mContext = new RavenwoodContext(rule.mPackageName, main); in init()
120 rule.mInstrumentation = new Instrumentation(); in init()
121 rule.mInstrumentation.basicInit(rule.mContext); in init()
122 InstrumentationRegistry.registerInstance(rule.mInstrumentation, Bundle.EMPTY); in init()
124 RavenwoodSystemServer.init(rule); in init()
[all …]
/frameworks/native/services/inputflinger/dispatcher/trace/
DInputTracingPerfettoBackend.cpp114 for (const auto& rule : mConfig.rules) { in initializeUidMap() local
115 for (const auto& package : rule.matchAllPackages) { in initializeUidMap()
118 for (const auto& package : rule.matchAnyPackages) { in initializeUidMap()
141 for (const auto& rule : mConfig.rules) { in resolveTraceLevel() local
142 if (ruleMatches(rule, metadata)) { in resolveTraceLevel()
143 return rule.level; in resolveTraceLevel()
150 bool PerfettoBackend::InputEventDataSource::ruleMatches(const TraceRule& rule, in ruleMatches() argument
155 if (rule.matchSecure.has_value() && *rule.matchSecure != metadata.isSecure) { in ruleMatches()
160 if (rule.matchImeConnectionActive.has_value() && in ruleMatches()
161 *rule.matchImeConnectionActive != metadata.isImeConnectionActive) { in ruleMatches()
[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 …]

12345678910>>...23