Home
last modified time | relevance | path

Searched refs:condition (Results 1 – 25 of 123) sorted by relevance

12345

/frameworks/native/services/surfaceflinger/tests/
DCredentials_test.cpp136 void checkWithPrivileges(std::function<T()> condition, T privilegedValue, T unprivilegedValue) { in checkWithPrivileges() argument
139 ASSERT_EQ(privilegedValue, condition()); in checkWithPrivileges()
143 ASSERT_EQ(privilegedValue, condition()); in checkWithPrivileges()
147 ASSERT_EQ(privilegedValue, condition()); in checkWithPrivileges()
151 ASSERT_EQ(unprivilegedValue, condition()); in checkWithPrivileges()
174 std::function<bool()> condition = [] { in TEST_F() local
178 ASSERT_NO_FATAL_FAILURE(checkWithPrivileges(condition, true, true)); in TEST_F()
202 std::function<status_t()> condition = [=]() { in TEST_F() local
206 ASSERT_NO_FATAL_FAILURE(checkWithPrivileges<status_t>(condition, NO_ERROR, NO_ERROR)); in TEST_F()
211 std::function<status_t()> condition = [=]() { in TEST_F() local
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DScheduleConditionProviderTest.java96 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_noAlarmExit_InSchedule() local
99 assertEquals(Condition.STATE_TRUE, condition.state); in testEvaluateSubscription_noAlarmExit_InSchedule()
122 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed() local
125 assertEquals(Condition.STATE_FALSE, condition.state); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed()
150 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_noAlarmExit_beforeSchedule() local
153 assertEquals(Condition.STATE_FALSE, condition.state); in testEvaluateSubscription_noAlarmExit_beforeSchedule()
173 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_noAlarmExit_endSchedule() local
176 assertEquals(Condition.STATE_FALSE, condition.state); in testEvaluateSubscription_noAlarmExit_endSchedule()
194 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_alarmSetBeforeInSchedule() local
196 assertEquals(Condition.STATE_TRUE, condition.state); in testEvaluateSubscription_alarmSetBeforeInSchedule()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/notification/
DEnableZenModeDialog.java120 if (isForever(tag.condition)) { in createDialog()
124 } else if (isAlarm(tag.condition)) { in createDialog()
128 } else if (isCountdown(tag.condition)) { in createDialog()
133 Slog.d(TAG, "Invalid manual condition: " + tag.condition); in createDialog()
138 getRealConditionId(tag.condition), TAG); in createDialog()
186 protected void bind(final Condition condition, final View row, final int rowId) { in bind() argument
187 if (condition == null) throw new IllegalArgumentException("condition must not be null"); in bind()
189 final boolean enabled = condition.state == Condition.STATE_TRUE; in bind()
197 tag.condition = condition; in bind()
198 final Uri conditionId = getConditionId(tag.condition); in bind()
[all …]
/frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyAndException/src/com/android/multidexlegacyandexception/
DIntermediateClass.java20 public static int get1(boolean condition) { in get1() argument
21 return new ClassInSecondaryDex(condition).get1(); in get1()
24 public static int get2(boolean condition) { in get2() argument
25 return new ClassInSecondaryDex(condition).get2(); in get2()
28 public static int get3(boolean condition) { in get3() argument
29 ClassInSecondaryDex thrower = new ClassInSecondaryDex(condition); in get3()
53 public static int get4(boolean condition) { in get4() argument
54 ClassInSecondaryDex thrower = new ClassInSecondaryDex(condition); in get4()
DMainActivity.java33 public int get1(boolean condition) { in get1() argument
34 return IntermediateClass.get1(condition); in get1()
37 public int get2(boolean condition) { in get2() argument
38 return IntermediateClass.get2(condition); in get2()
40 public int get3(boolean condition) { in get3() argument
41 return MiniIntermediateClass.get3(condition); in get3()
DClassInSecondaryDex.java20 private boolean condition; field in ClassInSecondaryDex
22 public ClassInSecondaryDex(boolean condition) { in ClassInSecondaryDex() argument
23 this.condition = condition; in ClassInSecondaryDex()
28 if (condition) { in canThrow1()
35 if (condition) { in canThrow2()
DTestApplication.java23 private static void canThrow1(boolean condition) throws ExceptionInMainDex { in canThrow1() argument
24 if (condition) { in canThrow1()
30 public static int get(boolean condition) { in get() argument
32 canThrow1(condition); in get()
DMiniIntermediateClass.java20 public static int get3(boolean condition) { in get3() argument
21 ClassInSecondaryDex thrower = new ClassInSecondaryDex(condition); in get3()
/frameworks/base/tests/testables/src/android/testing/
DPollingCheck.java62 public static void check(CharSequence message, long timeout, Callable<Boolean> condition) in check() argument
65 if (condition.call()) { in check()
76 public static void waitFor(final PollingCheckCondition condition) { in waitFor() argument
80 return condition.canProceed(); in waitFor()
85 public static void waitFor(long timeout, final PollingCheckCondition condition) { in waitFor() argument
89 return condition.canProceed(); in waitFor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DZenModePanel.java293 mExitCondition = manualRule != null ? manualRule.condition : null; in onAttach()
333 private void setSessionExitCondition(Condition condition) { in setSessionExitCondition() argument
334 if (Objects.equals(condition, mSessionExitCondition)) return; in setSessionExitCondition()
335 if (DEBUG) Log.d(mTag, "mSessionExitCondition=" + getConditionId(condition)); in setSessionExitCondition()
336 mSessionExitCondition = condition; in setSessionExitCondition()
393 private static Uri getConditionId(Condition condition) { in getConditionId() argument
394 return condition != null ? condition.id : null; in getConditionId()
397 private Uri getRealConditionId(Condition condition) { in getRealConditionId() argument
398 return isForever(condition) ? null : getConditionId(condition); in getRealConditionId()
401 private static Condition copy(Condition condition) { in copy() argument
[all …]
/frameworks/base/core/java/android/hardware/camera2/legacy/
DGLThreadManager.java61 public final ConditionVariable condition; field in GLThreadManager.ConfigureHolder
65 public ConfigureHolder(ConditionVariable condition, Collection<Pair<Surface, in ConfigureHolder() argument
67 this.condition = condition; in ConfigureHolder()
91 configure.condition.open();
216 final ConditionVariable condition = new ConditionVariable(/*closed*/false); in setConfigurationAndWait() local
217 ConfigureHolder configure = new ConfigureHolder(condition, surfaces, collector); in setConfigurationAndWait()
223 condition.block(); in setConfigurationAndWait()
/frameworks/base/core/tests/coretests/src/android/util/
DPollingCheck.java80 public static void waitFor(final PollingCheckCondition condition) { in waitFor() argument
84 return condition.canProceed(); in waitFor()
95 public static void waitFor(long timeout, final PollingCheckCondition condition) { in waitFor() argument
99 return condition.canProceed(); in waitFor()
/frameworks/base/services/core/java/com/android/server/notification/
DZenModeConditions.java69 if (config.manualRule != null && config.manualRule.condition != null in evaluateConfig()
115 public void onConditionChanged(Uri id, Condition condition) { in onConditionChanged() argument
116 if (DEBUG) Log.d(TAG, "onConditionChanged " + id + " " + condition); in onConditionChanged()
119 mHelper.setAutomaticZenRuleState(id, condition); in onConditionChanged()
163 rule.condition = null; in evaluateRule()
168 if (rule.component != null && rule.condition == null) { in evaluateRule()
169 rule.condition = mConditionProviders.findCondition(rule.component, rule.conditionId); in evaluateRule()
170 if (rule.condition != null && DEBUG) Log.d(TAG, "Found existing condition for: " in evaluateRule()
DScheduleConditionProvider.java172 Condition condition = in evaluateSubscriptions() local
175 if (condition != null) { in evaluateSubscriptions()
176 conditionsToNotify.add(condition); in evaluateSubscriptions()
190 Condition condition; in evaluateSubscriptionLocked() local
192 condition = createCondition(conditionId, Condition.STATE_ERROR, "!invalidId"); in evaluateSubscriptionLocked()
194 return condition; in evaluateSubscriptionLocked()
198 condition = createCondition(conditionId, Condition.STATE_FALSE, "snoozed"); in evaluateSubscriptionLocked()
200 condition = createCondition(conditionId, Condition.STATE_FALSE, "alarmCanceled"); in evaluateSubscriptionLocked()
203 condition = createCondition(conditionId, Condition.STATE_TRUE, "meetsSchedule"); in evaluateSubscriptionLocked()
206 condition = createCondition(conditionId, Condition.STATE_FALSE, "!meetsSchedule"); in evaluateSubscriptionLocked()
[all …]
/frameworks/base/tests/SmokeTest/tests/src/com/android/smoketest/
DProcessErrorsTest.java291 String condition; in reportListContents() local
292 switch (entry.condition) { in reportListContents()
294 condition = "a CRASH"; in reportListContents()
297 condition = "an ANR"; in reportListContents()
300 condition = "an unknown error"; in reportListContents()
305 condition, entry.shortMsg)); in reportListContents()
306 if (entry.condition == ActivityManager.ProcessErrorStateInfo.CRASHED) { in reportListContents()
354 return (info.condition == peOther.info.condition) in equals()
375 code += info.condition; in hashCode()
/frameworks/base/test-base/src/junit/framework/
DAssert.java18 static public void assertTrue(String message, boolean condition) { in assertTrue() argument
19 if (!condition) in assertTrue()
26 static public void assertTrue(boolean condition) { in assertTrue() argument
27 assertTrue(null, condition); in assertTrue()
33 static public void assertFalse(String message, boolean condition) { in assertFalse() argument
34 assertTrue(message, !condition); in assertFalse()
40 static public void assertFalse(boolean condition) { in assertFalse() argument
41 assertFalse(null, condition); in assertFalse()
/frameworks/base/cmds/statsd/src/metrics/
Dmetrics_manager_util.cpp110 const int64_t condition, const int metricIndex, in handleMetricWithConditions() argument
116 auto condition_it = conditionTrackerMap.find(condition); in handleMetricWithConditions()
118 ALOGW("cannot find Predicate \"%lld\" in the config", (long long)condition); in handleMetricWithConditions()
123 auto it = conditionTrackerMap.find(link.condition()); in handleMetricWithConditions()
125 ALOGW("cannot find Predicate \"%lld\" in the config", (long long)link.condition()); in handleMetricWithConditions()
239 const Predicate& condition = config.predicate(i); in initConditions() local
241 switch (condition.contents_case()) { in initConditions()
244 if (isStateTracker(condition.simple_predicate(), &primaryKeys)) { in initConditions()
245 allConditionTrackers.push_back(new StateTracker(key, condition.id(), index, in initConditions()
246 condition.simple_predicate(), in initConditions()
[all …]
DDurationMetricProducer.cpp113 mc.conditionId = link.condition(); in DurationMetricProducer()
183 void DurationMetricProducer::onSlicedConditionMayChangeLocked_opt1(bool condition, in onSlicedConditionMayChangeLocked_opt1() argument
256 void DurationMetricProducer::onSlicedConditionMayChangeLocked_opt2(bool condition, in onSlicedConditionMayChangeLocked_opt2() argument
691 bool condition, const LogEvent& event) { in handleStartEvent() argument
712 it->second->noteStart(whatKey, condition, in handleStartEvent()
718 it->second->noteStart(DEFAULT_DIMENSION_KEY, condition, in handleStartEvent()
724 dimensionKey, condition, event.GetElapsedTimestampNs(), conditionKeys); in handleStartEvent()
731 const ConditionKey& conditionKeys, bool condition, in onMatchedLogEventInternalLocked() argument
791 bool condition; in onMatchedLogEventLocked() local
804 condition = conditionState == ConditionState::kTrue; in onMatchedLogEventLocked()
[all …]
DMetricProducer.cpp52 bool condition; in onMatchedLogEventLocked() local
64 condition = (conditionState == ConditionState::kTrue); in onMatchedLogEventLocked()
67 condition = mCondition == ConditionState::kTrue; in onMatchedLogEventLocked()
70 if (mDimensionsInCondition.empty() && condition) { in onMatchedLogEventLocked()
80 matcherIndex, metricKey, conditionKey, condition, event); in onMatchedLogEventLocked()
84 matcherIndex, metricKey, conditionKey, condition, event); in onMatchedLogEventLocked()
/frameworks/base/telephony/java/android/telephony/ims/stub/
DImsUtImplBase.java122 public int queryCallForward(int condition, String number) throws RemoteException {
123 return ImsUtImplBase.this.queryCallForward(condition, number);
163 public int updateCallForward(int action, int condition, String number, int serviceClass,
165 return ImsUtImplBase.this.updateCallForward(action, condition, number, serviceClass,
246 public int queryCallForward(int condition, String number) { in queryCallForward() argument
351 public int updateCallForward(int action, int condition, String number, int serviceClass, in updateCallForward() argument
/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/
DADebug.h61 #define CHECK(condition) \ argument
63 !(condition), \
66 " CHECK(" #condition ") failed.")
107 #define CHECK_DBG(condition) argument
/frameworks/base/services/robotests/backup/src/com/android/server/backup/testing/
DTestUtils.java62 public static void waitUntil(Supplier<Boolean> condition) in waitUntil() argument
64 waitUntil(condition, STEP_MS, TIMEOUT_MS); in waitUntil()
67 public static void waitUntil(Supplier<Boolean> condition, long stepMs, long timeoutMs) in waitUntil() argument
71 if (condition.get()) { in waitUntil()
/frameworks/base/cmds/statsd/
DAndroid.bp65 "src/condition/CombinationConditionTracker.cpp",
66 "src/condition/condition_util.cpp",
67 "src/condition/SimpleConditionTracker.cpp",
68 "src/condition/ConditionWizard.cpp",
69 "src/condition/StateTracker.cpp",
280 "tests/condition/CombinationConditionTracker_test.cpp",
281 "tests/condition/SimpleConditionTracker_test.cpp",
282 "tests/condition/StateTracker_test.cpp",
283 "tests/condition/ConditionTimer_test.cpp",
/frameworks/base/telephony/java/com/android/ims/internal/
DIImsUt.aidl42 int queryCallForward(int condition, String number); in queryCallForward() argument
82 int updateCallForward(int action, int condition, String number, in updateCallForward() argument
/frameworks/native/libs/renderengine/gl/
DImageManager.cpp65 barrier->condition.notify_one(); in cacheAsync()
78 barrier->condition.wait(barrier->mutex, in cache()
139 entry.barrier->condition.notify_one(); in threadMain()

12345