Home
last modified time | relevance | path

Searched refs:Condition (Results 1 – 25 of 159) sorted by relevance

1234567

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shared/condition/
DConditionTest.java50 final Condition.Callback callback = mock( in addCallback_addFirstCallback_triggerStart()
51 Condition.Callback.class); in addCallback_addFirstCallback_triggerStart()
58 final Condition.Callback callback1 = mock( in addCallback_addMultipleCallbacks_triggerStartOnlyOnce()
59 Condition.Callback.class); in addCallback_addMultipleCallbacks_triggerStartOnlyOnce()
60 final Condition.Callback callback2 = mock( in addCallback_addMultipleCallbacks_triggerStartOnlyOnce()
61 Condition.Callback.class); in addCallback_addMultipleCallbacks_triggerStartOnlyOnce()
62 final Condition.Callback callback3 = mock( in addCallback_addMultipleCallbacks_triggerStartOnlyOnce()
63 Condition.Callback.class); in addCallback_addMultipleCallbacks_triggerStartOnlyOnce()
74 final Condition.Callback callback1 = mock( in addCallback_alreadyStarted_triggerUpdate()
75 Condition.Callback.class); in addCallback_alreadyStarted_triggerUpdate()
[all …]
DConditionMonitorTest.java54 private HashSet<Condition> mConditions;
77 private Condition createMockCondition() { in createMockCondition()
78 final Condition condition = Mockito.mock( in createMockCondition()
79 Condition.class); in createMockCondition()
86 final Condition overridingCondition = createMockCondition(); in testOverridingCondition()
87 final Condition regularCondition = createMockCondition(); in testOverridingCondition()
112 final ArgumentCaptor<Condition.Callback> mCallbackCaptor = in testOverridingCondition()
113 ArgumentCaptor.forClass(Condition.Callback.class); in testOverridingCondition()
141 final Condition overridingCondition = createMockCondition(); in testMultipleOverridingConditions()
142 final Condition overridingCondition2 = createMockCondition(); in testMultipleOverridingConditions()
[all …]
/frameworks/base/core/tests/coretests/src/android/service/notification/
DConditionTest.java46 Condition cond1 = new Condition(longUri, longString, Condition.STATE_TRUE); in testLongFields_inConstructors()
48 assertEquals(Condition.MAX_STRING_LENGTH, cond1.id.toString().length()); in testLongFields_inConstructors()
49 assertEquals(Condition.MAX_STRING_LENGTH, cond1.summary.length()); in testLongFields_inConstructors()
52 Condition cond2 = new Condition(longUri, longString, longString, longString, in testLongFields_inConstructors()
53 -1, Condition.STATE_TRUE, Condition.FLAG_RELEVANT_ALWAYS); in testLongFields_inConstructors()
55 assertEquals(Condition.MAX_STRING_LENGTH, cond2.id.toString().length()); in testLongFields_inConstructors()
56 assertEquals(Condition.MAX_STRING_LENGTH, cond2.summary.length()); in testLongFields_inConstructors()
57 assertEquals(Condition.MAX_STRING_LENGTH, cond2.line1.length()); in testLongFields_inConstructors()
58 assertEquals(Condition.MAX_STRING_LENGTH, cond2.line2.length()); in testLongFields_inConstructors()
65 Condition cond = new Condition(Uri.parse("uri://placeholder"), "placeholder", in testLongFields_viaParcel()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/condition/
DCondition.java37 public abstract class Condition { class
48 public Condition() { in Condition() method in Condition
57 protected Condition(Boolean initialConditionMet, boolean overriding) { in Condition() method in Condition
212 public Condition and(@NonNull Collection<Condition> others) { in and()
213 final List<Condition> conditions = new ArrayList<>(others); in and()
222 public Condition and(@NonNull Condition other) { in and()
230 public Condition or(@NonNull Collection<Condition> others) { in or()
231 final List<Condition> conditions = new ArrayList<>(others); in or()
240 public Condition or(@NonNull Condition other) { in or()
253 void onConditionChanged(Condition condition); in onConditionChanged()
DMonitor.java41 private final Set<Condition> mPreconditions;
43 private final HashMap<Condition, ArraySet<Subscription.Token>> mConditions = new HashMap<>();
59 public Set<Condition> getConditions() { in getConditions()
142 private final Condition.Callback mConditionCallback = new Condition.Callback() {
144 public void onConditionChanged(Condition condition) {
160 public Monitor(Executor executor, Set<Condition> preconditions) { in Monitor()
165 private void updateConditionMetState(Condition condition) { in updateConditionMetState()
188 Set<Condition> preconditions) { in addSubscription()
264 private final Set<Condition> mConditions;
275 private Subscription(Set<Condition> conditions, Callback callback, in Subscription()
[all …]
DCombinedCondition.kt25 private val conditions: Collection<Condition>, in <lambda>()
27 ) : Condition(null, false), Condition.Callback { in <lambda>()
34 override fun onConditionChanged(condition: Condition) { in <lambda>()
/frameworks/base/core/java/android/service/notification/
DCondition.java36 public final class Condition implements Parcelable { class
104 public Condition(Uri id, String summary, int state) { in Condition() method in Condition
108 public Condition(Uri id, String summary, String line1, String line2, int icon, in Condition() method in Condition
122 public Condition(Parcel source) { in Condition() method in Condition
126 this((Uri)source.readParcelable(Condition.class.getClassLoader(), android.net.Uri.class), in Condition()
152 return new StringBuilder(Condition.class.getSimpleName()).append('[') in toString()
197 if (!(o instanceof Condition)) return false; in equals()
199 final Condition other = (Condition) o; in equals()
219 public Condition copy() { in copy()
224 return new Condition(parcel); in copy()
[all …]
DIConditionListener.aidl20 import android.service.notification.Condition;
24 void onConditionsReceived(in Condition[] conditions); in onConditionsReceived()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DScheduleConditionProviderTest.java13 import android.service.notification.Condition;
64 assertEquals(Condition.STATE_ERROR, in testIsValidConditionId_incomplete()
100 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_noAlarmExit_InSchedule()
103 assertEquals(Condition.STATE_TRUE, condition.state); in testEvaluateSubscription_noAlarmExit_InSchedule()
126 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed()
129 assertEquals(Condition.STATE_FALSE, condition.state); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed()
154 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_noAlarmExit_beforeSchedule()
157 assertEquals(Condition.STATE_FALSE, condition.state); in testEvaluateSubscription_noAlarmExit_beforeSchedule()
177 Condition condition = mService.evaluateSubscriptionLocked( in testEvaluateSubscription_noAlarmExit_endSchedule()
180 assertEquals(Condition.STATE_FALSE, condition.state); in testEvaluateSubscription_noAlarmExit_endSchedule()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DScheduleConditionProvider.java30 import android.service.notification.Condition;
133 notifyCondition(createCondition(conditionId, Condition.STATE_ERROR, "invalidId")); in onSubscribe()
169 List<Condition> conditionsToNotify = new ArrayList<>(); in evaluateSubscriptions()
173 Condition condition = in evaluateSubscriptions()
181 notifyConditions(conditionsToNotify.toArray(new Condition[conditionsToNotify.size()])); in evaluateSubscriptions()
187 Condition evaluateSubscriptionLocked(Uri conditionId, ScheduleCalendar cal, in evaluateSubscriptionLocked()
191 Condition condition; in evaluateSubscriptionLocked()
193 condition = createCondition(conditionId, Condition.STATE_ERROR, "!invalidId"); in evaluateSubscriptionLocked()
199 condition = createCondition(conditionId, Condition.STATE_FALSE, "snoozed"); in evaluateSubscriptionLocked()
201 condition = createCondition(conditionId, Condition.STATE_FALSE, "alarmCanceled"); in evaluateSubscriptionLocked()
[all …]
DEventConditionProvider.java33 import android.service.notification.Condition;
149 notifyCondition(createCondition(conditionId, Condition.STATE_FALSE)); in onSubscribe()
209 List<Condition> conditionsToNotify = new ArrayList<>(); in evaluateSubscriptionsW()
220 conditionsToNotify.add(createCondition(conditionId, Condition.STATE_FALSE)); in evaluateSubscriptionsW()
242 conditionsToNotify.add(createCondition(conditionId, Condition.STATE_FALSE)); in evaluateSubscriptionsW()
252 conditionsToNotify.add(createCondition(conditionId, Condition.STATE_FALSE)); in evaluateSubscriptionsW()
255 conditionsToNotify.add(createCondition(conditionId, Condition.STATE_TRUE)); in evaluateSubscriptionsW()
259 for (Condition condition : conditionsToNotify) { in evaluateSubscriptionsW()
293 private Condition createCondition(Uri id, int state) { in createCondition()
297 return new Condition(id, summary, line1, line2, 0, state, Condition.FLAG_RELEVANT_ALWAYS); in createCondition()
DCountdownConditionProvider.java27 import android.service.notification.Condition;
127 notifyCondition(newCondition(mTime, mIsAlarm, Condition.STATE_FALSE)); in onSubscribe()
163 notifyCondition(newCondition(time, alarm, Condition.STATE_FALSE)); in onReceive()
169 private static final Condition newCondition(long time, boolean alarm, int state) { in newCondition()
170 return new Condition(ZenModeConfig.toCountdownConditionId(time, alarm), in newCondition()
171 "", "", "", 0, state,Condition.FLAG_RELEVANT_NOW); in newCondition()
DConditionProviders.java32 import android.service.notification.Condition;
264 private Condition[] removeDuplicateConditions(String pkg, Condition[] conditions) { in removeDuplicateConditions()
267 final ArrayMap<Uri, Condition> valid = new ArrayMap<Uri, Condition>(N); in removeDuplicateConditions()
278 final Condition[] rt = new Condition[valid.size()]; in removeDuplicateConditions()
302 public void notifyConditions(String pkg, ManagedServiceInfo info, Condition[] conditions) { in notifyConditions()
310 final Condition c = conditions[i]; in notifyConditions()
318 final Condition c = conditions[i]; in notifyConditions()
335 public Condition findCondition(ComponentName component, Uri conditionId) { in findCondition()
438 public Condition condition;
459 void onConditionChanged(Uri id, Condition condition); in onConditionChanged()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/notification/
DEnableZenModeDialog.java28 import android.service.notification.Condition;
122 mForeverId = Condition.newId(mContext).appendPath("forever").build(); in createDialog()
202 protected void bind(final Condition condition, final View row, final int rowId) { in bind()
205 final boolean enabled = condition.state == Condition.STATE_TRUE; in bind()
243 protected void bindConditions(Condition c) { in bindConditions()
270 public static Uri getConditionId(Condition condition) { in getConditionId()
274 public Condition forever() { in forever()
275 Uri foreverId = Condition.newId(mContext).appendPath("forever").build(); in forever()
276 return new Condition(foreverId, foreverSummary(mContext), "", "", 0 /*icon*/, in forever()
277 Condition.STATE_TRUE, 0 /*flags*/); in forever()
[all …]
/frameworks/av/services/camera/libcameraservice/api1/client2/
DCaptureSequencer.h87 Condition mStartCaptureSignal;
92 Condition mNewNotifySignal;
97 Condition mNewFrameSignal;
103 Condition mNewCaptureSignal;
108 Condition mShutterNotifySignal;
140 Condition mStateChanged;
/frameworks/opt/telephony/src/java/com/android/internal/telephony/data/
DDataEnabledOverride.java34 import com.android.internal.telephony.data.DataEnabledOverride.OverrideConditions.Condition;
127 boolean isSatisfiedByConditions(@ApnType int apnType, @Condition int providedConditions) { in isSatisfiedByConditions()
195 public @interface Condition {} annotation in DataEnabledOverride.OverrideConditions
222 private final @Condition int mConditions;
238 OverrideConditions(@Condition int conditions) { in OverrideConditions()
242 private static String getStringFromBitmask(@Condition int conditions) { in getStringFromBitmask()
255 private static @Condition int getBitmaskFromString(@NonNull String str) { in getBitmaskFromString()
281 boolean allMet(@Condition int providedConditions) { in allMet()
373 @Condition int providedConditions) { in canSatisfyAnyRule()
382 private @Condition int getCurrentConditions(Phone phone) { in getCurrentConditions()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/
DEnableZenModeDialogTest.java39 import android.service.notification.Condition;
65 private Condition mCountdownCondition;
66 private Condition mAlarmCondition;
80 mController.mForeverId = Condition.newId(mContext).appendPath("forever").build(); in setup()
99 Uri alarm = Condition.newId(mContext).appendPath("alarm").build(); in setup()
100 mAlarmCondition = new Condition(alarm, "alarm", "", "", 0, 0, 0); in setup()
101 Uri countdown = Condition.newId(mContext).appendPath("countdown").build(); in setup()
102 mCountdownCondition = new Condition(countdown, "countdown", "", "", 0, 0, 0); in setup()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/condition/
DConditionalCoreStartable.java20 import com.android.systemui.shared.condition.Condition;
31 private final Set<Condition> mConditionSet;
39 public ConditionalCoreStartable(Monitor monitor, Set<Condition> conditionSet) { in ConditionalCoreStartable()
/frameworks/base/libs/hwui/renderthread/
DRenderTask.h25 class Condition; variable
62 SignalingRenderTask(RenderTask* task, Mutex* lock, Condition* signal) in SignalingRenderTask()
70 Condition* mSignal;
/frameworks/base/packages/SystemUI/src/com/android/systemui/process/condition/
DSystemProcessCondition.java20 import com.android.systemui.shared.condition.Condition;
28 public class SystemProcessCondition extends Condition {
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/process/condition/
DSystemProcessConditionTest.java29 import com.android.systemui.shared.condition.Condition;
64 final Condition condition = new SystemProcessCondition(mProcessWrapper); in testConditionFailsWithNonSystemProcess()
85 final Condition condition = new SystemProcessCondition(mProcessWrapper); in testConditionSucceedsWithSystemProcess()
/frameworks/base/packages/SystemUI/src-release/com/android/systemui/flags/
DFlagsModule.kt36 abstract fun bindsScreenIdleCondition(impl: ScreenIdleCondition): ConditionalRestarter.Condition in bindsFeatureFlagRelease()
40 abstract fun bindsPluggedInCondition(impl: PluggedInCondition): ConditionalRestarter.Condition in bindsFeatureFlagRelease()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/condition/
DConditionalCoreStartableTest.java32 import com.android.systemui.shared.condition.Condition;
57 public FakeConditionalCoreStartable(Monitor monitor, Set<Condition> conditions, in FakeConditionalCoreStartable()
80 final Set<Condition> mConditions = new HashSet<>();
83 Condition mCondition;
/frameworks/native/libs/gui/tests/
DDisconnectWaiter.h72 Condition mDisconnectCondition;
75 Condition mFrameCondition;
/frameworks/av/media/libstagefright/include/media/stagefright/
DMediaAdapter.h63 Condition mBufferReadCond;
65 Condition mBufferReturnedCond;

1234567