Searched defs:rule (Results 1 - 25 of 26) sorted by relevance

12

/frameworks/base/tools/split-select/
H A DRule_test.cpp33 Rule rule(AndRule()
71 std::string result(rule.toJson().string());
78 sp<Rule> rule = new Rule(AndRule() local
82 EXPECT_RULES_EQ(Rule::simplify(rule), EqRule(Rule::SDK_VERSION, 7));
86 sp<Rule> rule = new Rule(AndRule() local
93 EXPECT_RULES_EQ(Rule::simplify(rule),
H A DRule.cpp177 sp<Rule> Rule::simplify(sp<Rule> rule) { argument
178 if (rule->op != AND_SUBRULES && rule->op != OR_SUBRULES) {
179 return rule;
183 newSubrules.setCapacity(rule->subrules.size());
184 const size_t subruleCount = rule->subrules.size();
186 sp<Rule> simplifiedRule = simplify(rule->subrules.editItemAt(i));
188 if (simplifiedRule->op == rule->op) {
202 rule->subrules = newSubrules;
203 return rule;
[all...]
H A DSplitSelector_test.cpp59 sp<Rule> rule = rules[idx]; local
60 ASSERT_TRUE(rule != NULL);
69 EXPECT_RULES_EQ(rule, expectedRule);
H A DTestRules.cpp28 Rule rule; local
29 rule.op = Rule::EQUALS;
30 rule.key = key;
31 rule.longArgs.add(value);
32 return rule;
36 Rule rule; local
37 rule.op = Rule::GREATER_THAN;
38 rule.key = key;
39 rule.longArgs.add(value);
40 return rule;
44 Rule rule; local
52 Rule rule; local
60 Rule rule; local
69 Rule rule; local
[all...]
H A DSplitSelector.cpp76 sp<Rule> rule = Rule::simplify(RuleGenerator::generate(splits, j)); local
77 if (rule != NULL) {
78 rules.add(splits[j], rule);
/frameworks/support/transition/tests/src/android/support/transition/
H A DBaseTest.java19 import android.support.test.rule.ActivityTestRule;
29 public final ActivityTestRule<TransitionActivity> rule; field in class:BaseTest
32 rule = new ActivityTestRule<>(TransitionActivity.class);
/frameworks/av/media/libaudioclient/
H A DAudioPolicy.cpp29 uint32_t rule)
30 : mRule(rule)
27 AudioMixMatchCriterion(audio_usage_t usage, audio_source_t source, uint32_t rule) argument
/frameworks/support/design/tests/src/android/support/test/rule/
H A DBootlegActivityTestRule.java17 package android.support.test.rule;
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DZenModeController.java45 default void onManualRuleChanged(ZenRule rule) {} argument
H A DZenModeControllerImpl.java193 private void fireManualRuleChanged(ZenRule rule) { argument
194 Utils.safeForeach(mCallbacks, c -> c.onManualRuleChanged(rule));
/frameworks/base/services/core/java/com/android/server/notification/
H A DZenModeConditions.java66 if (DEBUG) Log.d(TAG, "evaluateConfig: clearing manual rule");
123 private void evaluateRule(ZenRule rule, ArraySet<Uri> current, boolean processSubscriptions) { argument
124 if (rule == null || rule.conditionId == null) return;
125 final Uri id = rule.conditionId;
130 rule.component = sp.getComponent();
135 final IConditionProvider cp = mConditionProviders.findConditionProvider(rule.component);
136 if (DEBUG) Log.d(TAG, "Ensure external rule exists: " + (cp != null) + " for " + id);
138 mConditionProviders.ensureRecordExists(rule.component, id, cp);
141 if (rule
178 updateSnoozing(ZenRule rule) argument
187 updateCondition(Uri id, Condition condition, ZenRule rule) argument
[all...]
H A DZenModeHelper.java262 for (ZenRule rule : mConfig.automaticRules.values()) {
263 if (canManageAutomaticZenRule(rule)) {
264 rules.add(rule);
272 ZenRule rule;
275 rule = mConfig.automaticRules.get(id);
277 if (rule == null) return null;
278 if (canManageAutomaticZenRule(rule)) {
279 return createAutomaticZenRule(rule);
305 throw new AndroidRuntimeException("Could not create rule");
308 Log.d(TAG, "addAutomaticZenRule rule
394 canManageAutomaticZenRule(ZenRule rule) argument
415 isSystemRule(AutomaticZenRule rule) argument
438 populateZenRule(AutomaticZenRule automaticZenRule, ZenRule rule, boolean isNew) argument
456 createAutomaticZenRule(ZenRule rule) argument
[all...]
/frameworks/base/tools/aapt2/link/
H A DXmlCompatVersioner.cpp34 // (came from a rule).
55 const ApiVersion& src_attr_version, const IDegradeRule* rule,
61 // The API is compatible, so don't check the rule and just copy.
86 if (rule != nullptr) {
87 for (const DegradeResult& result : rule->Degrade(src_el, src_attr, out_string_pool)) {
121 auto rule = rules_->find(attr_resid);
122 ProcessRule(el, attr, attr_version, rule != rules_->end() ? rule->second.get() : nullptr,
54 ProcessRule(const xml::Element& src_el, const xml::Attribute& src_attr, const ApiVersion& src_attr_version, const IDegradeRule* rule, const util::Range<ApiVersion>& api_range, bool generated, xml::Element* dst_el, std::set<ApiVersion>* out_apis_referenced, StringPool* out_string_pool) argument
/frameworks/support/fragment/tests/java/android/support/v4/app/
H A DFragmentTestUtil.java29 import android.support.test.rule.ActivityTestRule;
48 public static void waitForExecution(final ActivityTestRule<? extends FragmentActivity> rule) { argument
54 rule.runOnUiThread(DO_NOTHING);
55 rule.runOnUiThread(DO_NOTHING);
61 private static void runOnUiThreadRethrow(ActivityTestRule<? extends Activity> rule, argument
67 rule.runOnUiThread(r);
75 final ActivityTestRule<? extends FragmentActivity> rule) {
76 FragmentManager fragmentManager = rule.getActivity().getSupportFragmentManager();
77 return executePendingTransactions(rule, fragmentManager);
81 final ActivityTestRule<? extends Activity> rule, fina
74 executePendingTransactions( final ActivityTestRule<? extends FragmentActivity> rule) argument
80 executePendingTransactions( final ActivityTestRule<? extends Activity> rule, final FragmentManager fm) argument
92 popBackStackImmediate(final ActivityTestRule<FragmentTestActivity> rule) argument
104 popBackStackImmediate(final ActivityTestRule<FragmentTestActivity> rule, final int id, final int flags) argument
118 popBackStackImmediate(final ActivityTestRule<FragmentTestActivity> rule, final String name, final int flags) argument
132 setContentView(final ActivityTestRule<FragmentTestActivity> rule, final int layoutId) argument
153 createController( ActivityTestRule<? extends FragmentActivity> rule) argument
168 resume(ActivityTestRule<? extends Activity> rule, final FragmentController fragmentController, final Pair<Parcelable, FragmentManagerNonConfig> savedState) argument
190 destroy( ActivityTestRule<? extends Activity> rule, final FragmentController fragmentController) argument
256 recreateActivity( ActivityTestRule<? extends RecreatedActivity> rule, final T activity) argument
[all...]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/graphics/
H A DBoundsRule.java70 ValueRule(ValueRule rule) { argument
71 this.mFraction = rule.mFraction;
72 this.mAbsoluteValue = rule.mAbsoluteValue;
76 * Sets the fractional value (percentage of parent) for this rule.
92 * Sets the absolute/offset value for rule.
151 private int doCalculate(int value, ValueRule rule, int size) { argument
152 return value + rule.mAbsoluteValue + (int) (rule.mFraction * size);
/frameworks/base/media/java/android/media/audiopolicy/
H A DAudioMix.java52 private AudioMix(AudioMixingRule rule, AudioFormat format, int routeFlags, int callbackFlags, argument
54 mRule = rule;
57 mMixType = rule.getTargetMixType();
198 * @param rule a non-null {@link AudioMixingRule} instance.
202 public Builder(AudioMixingRule rule) argument
204 if (rule == null) {
207 mRule = rule;
213 * @param rule
217 Builder setMixingRule(AudioMixingRule rule) argument
219 if (rule
[all...]
H A DAudioMixingRule.java32 * Here's an example of creating a mixing rule for all media playback:
51 * A rule requiring the usage information of the {@link AudioAttributes} to match.
52 * This mixing rule can be added with {@link Builder#addRule(AudioAttributes, int)} or
59 * A rule requiring the capture preset information of the {@link AudioAttributes} to match.
60 * This mixing rule can be added with {@link Builder#addRule(AudioAttributes, int)} or
67 * A rule requiring the UID of the audio stream to match that specified.
68 * This mixing rule can be added with {@link Builder#addMixRule(int, Object)} where the Object
77 * A rule requiring the usage information of the {@link AudioAttributes} to differ.
83 * A rule requiring the capture preset information of the {@link AudioAttributes} to differ.
89 * A rule requirin
100 AudioMixMatchCriterion(AudioAttributes attributes, int rule) argument
106 AudioMixMatchCriterion(Integer intProp, int rule) argument
148 isValidSystemApiRule(int rule) argument
159 isValidAttributesSystemApiRule(int rule) argument
170 isValidRule(int rule) argument
182 isPlayerRule(int rule) argument
230 addRule(AudioAttributes attrToMatch, int rule) argument
259 excludeRule(AudioAttributes attrToMatch, int rule) argument
281 addMixRule(int rule, Object property) argument
311 excludeMixRule(int rule, Object property) argument
326 checkAddRuleObjInternal(int rule, Object property) argument
365 addRuleInternal(AudioAttributes attrToMatch, Integer intProp, int rule) argument
[all...]
/frameworks/base/services/core/java/com/android/server/firewall/
H A DIntentFirewall.java161 // rule against the intent
163 Rule rule = candidateRules.get(i);
164 if (rule.matches(this, resolvedComponent, intent, callerUid, callerPid, resolvedType,
166 block |= rule.getBlock();
167 log |= rule.getLog();
336 Rule rule = new Rule();
340 // if we get an error while parsing a particular rule, we'll just ignore
341 // that rule and continue on with the next rule
343 rule
487 private final Rule rule; field in class:IntentFirewall.FirewallIntentFilter
489 FirewallIntentFilter(Rule rule) argument
529 addComponentFilter(ComponentName componentName, Rule rule) argument
[all...]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/
H A DUiccCarrierPrivilegeRules.java112 // Describes a single rule.
504 * Check if all rule bytes have been read from UICC.
544 Rlog.e(LOG_TAG, "Skip unrecognized rule." + refArDo.value);
551 * Parses a single rule.
553 private static AccessRule parseRefArdo(String rule) { argument
554 log("Got rule: " + rule);
561 while (!rule.isEmpty()) {
562 if (rule.startsWith(TAG_REF_DO)) {
564 rule
[all...]
/frameworks/base/core/java/android/service/notification/
H A DZenModeConfig.java253 final String rule = allRules.valueAt(i);
254 final ZenRule fromRule = automaticRules != null ? automaticRules.get(rule) : null;
255 final ZenRule toRule = to.automaticRules != null ? to.automaticRules.get(rule) : null;
256 ZenRule.appendDiff(d, "automaticRule[" + rule + "]", fromRule, toRule);
290 private static boolean isValidManualRule(ZenRule rule) { argument
291 return rule == null || Global.isValidZenMode(rule.zenMode) && sameCondition(rule);
294 private static boolean isValidAutomaticRule(ZenRule rule) { argument
295 return rule !
299 sameCondition(ZenRule rule) argument
509 writeRuleXml(ZenRule rule, XmlSerializer out) argument
[all...]
/frameworks/base/core/java/android/widget/
H A DRelativeLayout.java1403 * Adds a layout rule to be interpreted by the RelativeLayout.
1410 * If the rule is relative to the layout direction (ex.
1413 * {@link #getRule(int)} an absolute rule (ex.
1426 * Adds a layout rule to be interpreted by the RelativeLayout.
1432 * If the rule is relative to the layout direction (ex.
1435 * {@link #getRule(int)} with an absolute rule (ex. {@link #LEFT_OF}.
1446 // If we're removing a relative rule, we'll need to force layout
1459 * Removes a layout rule to be interpreted by the RelativeLayout.
1461 * If the rule is relative to the layout direction (ex.
1465 * {@link #getRule(int)} with an absolute rule (e
1500 isRelativeRule(int rule) argument
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
H A DZenModePanel.java441 private void handleUpdateManualRule(ZenRule rule) { argument
442 final int zen = rule != null ? rule.zenMode : Global.ZEN_MODE_OFF;
444 final Condition c = rule == null ? null
445 : rule.condition != null ? rule.condition
446 : createCondition(rule.conditionId);
459 // If there is a manual rule, but it has no condition listed then it is forever.
925 public void onManualRuleChanged(ZenRule rule) {
926 mHandler.obtainMessage(H.MANUAL_RULE_CHANGED, rule)
[all...]
/frameworks/base/services/core/java/com/android/server/
H A DNetworkManagementService.java1933 final String rule = allow ? "allow" : "deny";
1935 mConnector.execute("firewall", "set_interface_rule", iface, rule);
1945 final String rule = allow ? "allow" : "deny";
1947 mConnector.execute("firewall", "set_egress_source_rule", addr, rule);
1957 final String rule = allow ? "allow" : "deny";
1959 mConnector.execute("firewall", "set_egress_dest_rule", addr, port, rule);
1993 // a UID rule to the firewall, and then disable the firewall - the chains can contain
1994 // the wrong type of rule. In this case, don't close connections that we shouldn't.
1996 // TODO: tighten up this code by ensuring we never set the wrong type of rule, and
2002 // Close sockets for every UID that has a deny rule
2138 setFirewallUidRule(int chain, int uid, int rule) argument
2145 setFirewallUidRuleLocked(int chain, int uid, int rule) argument
2157 updateFirewallUidRuleLocked(int chain, int uid, int rule) argument
2184 getFirewallRuleName(int chain, int rule) argument
2682 setFirewallRule(int chain, int uid, int rule) argument
[all...]
/frameworks/base/services/core/java/com/android/server/net/
H A DNetworkPolicyManagerService.java1677 Slog.w(TAG, "shared quota unsupported; generating rule for each iface");
3267 * permission, since there is no need to change the {@code iptables} rule if the app does not
3300 // First step: define the new rule based on user restrictions and foreground state.
3383 // Dispatch changed rule to existing listeners.
3454 // First step: define the new rule based on user restrictions and foreground state.
3847 private void setUidFirewallRule(int chain, int uid, int rule) { argument
3850 "setUidFirewallRule: " + chain + "/" + uid + "/" + rule);
3854 mUidFirewallDozableRules.put(uid, rule);
3856 mUidFirewallStandbyRules.put(uid, rule);
3858 mUidFirewallPowerSaveRules.put(uid, rule);
4123 hasRule(int uidRules, int rule) argument
[all...]
/frameworks/base/tools/aapt/
H A DResource.cpp2903 // { rule --> { file locations } }
2906 void add(const String8& rule, const String8& where);
2909 void ProguardKeepSet::add(const String8& rule, const String8& where) argument
2911 ssize_t index = rules.indexOfKey(rule);
2913 index = rules.add(rule, SortedVector<String8>());
2939 String8 rule("-keep class ");
2940 rule += className;
2941 rule += " { <init>(...); }";
2949 keep->add(rule, location);
2956 String8 rule("
[all...]

Completed in 366 milliseconds

12