Home
last modified time | relevance | path

Searched refs:queue (Results 1 – 25 of 66) sorted by relevance

123

/cts/tests/tests/telephony/current/src/android/telephony/cts/
DTelephonyRegistryManagerTest.java102 LinkedBlockingQueue<Pair<Integer, String>> queue = new LinkedBlockingQueue<>(1); in testNotifyCallStateChangedForAllSubscriptions() local
106 queue.offer(Pair.create(state, number)); in testNotifyCallStateChangedForAllSubscriptions()
112 queue.poll(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in testNotifyCallStateChangedForAllSubscriptions()
119 Pair<Integer, String> result = queue.poll(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in testNotifyCallStateChangedForAllSubscriptions()
129 LinkedBlockingQueue<Pair<Integer, String>> queue = new LinkedBlockingQueue<>(1); in testNotifyCallStateChanged() local
133 queue.offer(Pair.create(state, number)); in testNotifyCallStateChanged()
140 queue.poll(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in testNotifyCallStateChanged()
150 Pair<Integer, String> result = queue.poll(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in testNotifyCallStateChanged()
160 LinkedBlockingQueue<ServiceState> queue = new LinkedBlockingQueue<>(1); in testNotifyServiceStateChanged() local
164 queue.offer(ss); in testNotifyServiceStateChanged()
[all …]
/cts/tests/signature/tests/src/android/signature/cts/tests/
DLineSpliteratorTestBase.java80 List<Spliterator<Integer>> queue = new LinkedList<>(); in testSplit() local
81 queue.add(createSpliterator(getRepetitions(1000), CONVERTER)); in testSplit()
89 assertTrue(!queue.isEmpty()); in testSplit()
92 Spliterator<Integer> split = queue.get(0).trySplit(); in testSplit()
94 queue.add(1, split); in testSplit()
100 if (!queue.get(0).tryAdvance(createVerifier(i))) { in testSplit()
101 queue.remove(0); in testSplit()
106 while (!queue.isEmpty()) { in testSplit()
107 Spliterator<Integer> first = queue.remove(0); in testSplit()
/cts/tests/tests/telephony/current/LocationAccessingApp/src/android/telephony/cts/locationaccessingapp/
DCtsLocationAccessService.java103 LinkedBlockingQueue<List<CellInfo>> queue = new LinkedBlockingQueue<>(); in listenForCellInfo() local
111 queue.offer(cis); in listenForCellInfo()
118 return queue.poll(LISTENER_TIMEOUT, TimeUnit.MILLISECONDS); in listenForCellInfo()
127 LinkedBlockingQueue<CellLocation> queue = new LinkedBlockingQueue<>(); in listenForCellLocation() local
135 queue.offer(cellLocation); in listenForCellLocation()
142 return queue.poll(LISTENER_TIMEOUT, TimeUnit.MILLISECONDS); in listenForCellLocation()
151 LinkedBlockingQueue<ServiceState> queue = new LinkedBlockingQueue<>(); in listenForServiceState() local
159 queue.offer(ss); in listenForServiceState()
166 ServiceState ss = queue.poll(LISTENER_TIMEOUT, TimeUnit.MILLISECONDS); in listenForServiceState()
179 LinkedBlockingQueue<List<CellInfo>> queue = new LinkedBlockingQueue<>(); in requestCellInfoUpdate() local
[all …]
/cts/tests/tests/telecom/src/android/telecom/cts/
DTelecomManagerTest.java51 LinkedBlockingQueue<Integer> queue = new LinkedBlockingQueue(1); in testGetCurrentTtyMode() local
53 queue.put(mTelecomManager.getCurrentTtyMode())); in testGetCurrentTtyMode()
55 int currentTtyMode = queue.poll(TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS, in testGetCurrentTtyMode()
140 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in testIsInEmergencyCall_noOngoingEmergencyCall() local
142 queue.put(mTelecomManager.isInEmergencyCall())); in testIsInEmergencyCall_noOngoingEmergencyCall()
144 boolean isInEmergencyCall = queue.poll(TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS, in testIsInEmergencyCall_noOngoingEmergencyCall()
173 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in testIsInEmergencyCall_ongoingEmergencyCall() local
175 queue.put(mTelecomManager.isInEmergencyCall())); in testIsInEmergencyCall_ongoingEmergencyCall()
177 boolean isInEmergencyCall = queue.poll(TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS, in testIsInEmergencyCall_ongoingEmergencyCall()
DNullBindingCallScreeningServiceTest.java118 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in addRoleHolder() local
124 queue.put(successful); in addRoleHolder()
129 boolean result = queue.poll(ASYNC_TIMEOUT, TimeUnit.MILLISECONDS); in addRoleHolder()
137 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in removeRoleHolder() local
143 queue.put(successful); in removeRoleHolder()
148 boolean result = queue.poll(ASYNC_TIMEOUT, TimeUnit.MILLISECONDS); in removeRoleHolder()
DIncomingCallTest.java166 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in testRingOnIncomingCall() local
176 if (isPlayingRingtone && queue.isEmpty()) { in testRingOnIncomingCall()
177 queue.add(isPlayingRingtone); in testRingOnIncomingCall()
187 Boolean ringing = queue.poll(WAIT_FOR_STATE_CHANGE_TIMEOUT_MS, TimeUnit.MILLISECONDS); in testRingOnIncomingCall()
202 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in testExtraCallHasInBandRingtone() local
212 if (isPlayingRingtone && queue.isEmpty()) { in testExtraCallHasInBandRingtone()
213 queue.add(isPlayingRingtone); in testExtraCallHasInBandRingtone()
225 Boolean ringing = queue.poll(WAIT_FOR_STATE_CHANGE_TIMEOUT_MS, TimeUnit.MILLISECONDS); in testExtraCallHasInBandRingtone()
DCallRedirectionServiceTest.java320 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in addRoleHolder() local
326 queue.put(successful); in addRoleHolder()
331 boolean result = queue.poll(ASYNC_TIMEOUT, TimeUnit.MILLISECONDS); in addRoleHolder()
339 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in removeRoleHolder() local
345 queue.put(successful); in removeRoleHolder()
350 boolean result = queue.poll(ASYNC_TIMEOUT, TimeUnit.MILLISECONDS); in removeRoleHolder()
DThirdPartyCallScreeningServiceTest.java584 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in addRoleHolder() local
590 queue.put(successful); in addRoleHolder()
595 boolean result = queue.poll(ASYNC_TIMEOUT, TimeUnit.MILLISECONDS); in addRoleHolder()
603 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue(1); in removeRoleHolder() local
609 queue.put(successful); in removeRoleHolder()
614 boolean result = queue.poll(ASYNC_TIMEOUT, TimeUnit.MILLISECONDS); in removeRoleHolder()
/cts/tests/tests/os/src/android/os/cts/
DMessageQueueTest.java281 MessageQueue queue = Looper.getMainLooper().getQueue(); in testRegisterFileDescriptorCallbackThrowsWhenFdIsNull() local
283 queue.addOnFileDescriptorEventListener(null, 0, in testRegisterFileDescriptorCallbackThrowsWhenFdIsNull()
299 MessageQueue queue = Looper.getMainLooper().getQueue(); in testRegisterFileDescriptorCallbackThrowsWhenCallbackIsNull() local
304 queue.addOnFileDescriptorEventListener(reader.getFileDescriptor(), 0, null); in testRegisterFileDescriptorCallbackThrowsWhenCallbackIsNull()
315 MessageQueue queue = Looper.getMainLooper().getQueue(); in testUnregisterFileDescriptorCallbackThrowsWhenFdIsNull() local
317 queue.removeOnFileDescriptorEventListener(null); in testUnregisterFileDescriptorCallbackThrowsWhenFdIsNull()
328 MessageQueue queue = Looper.getMainLooper().getQueue(); in testUnregisterFileDescriptorCallbackDoesNothingWhenFdNotRegistered() local
332 queue.removeOnFileDescriptorEventListener(reader.getFileDescriptor()); in testUnregisterFileDescriptorCallbackDoesNothingWhenFdNotRegistered()
345 final MessageQueue queue = thread.getLooper().getQueue(); in testFileDescriptorCallbacks() local
431 queue.addOnFileDescriptorEventListener(reader.getFD(), in testFileDescriptorCallbacks()
[all …]
/cts/tests/tests/media/bettertogether/src/android/media/bettertogether/cts/
DMediaSessionTestService.java59 public void onQueueChanged(List<MediaSession.QueueItem> queue) { in testSeriesOfSetQueue_setUp()
60 if (queue != null) { in testSeriesOfSetQueue_setUp()
61 if (numberOfItems.addAndGet(queue.size()) >= expectedTotalNumberOfItems) { in testSeriesOfSetQueue_setUp()
90 public void onQueueChanged(List<MediaSession.QueueItem> queue) { in testSetQueue_setUp()
91 if (queue != null && queue.size() == expectedQueueSize) { in testSetQueue_setUp()
DMediaSessionTest.java306 List<QueueItem> queue = new ArrayList<>(); in testConfigureSession() local
309 queue.add(item); in testConfigureSession()
310 mSession.setQueue(queue); in testConfigureSession()
321 assertThat(mCallback.mQueue.size()).isEqualTo(queue.size()); in testConfigureSession()
326 assertThat(controller.getQueue().size()).isEqualTo(queue.size()); in testConfigureSession()
1095 List<QueueItem> queue = new ArrayList<>(); in testSeriesOfSetQueue() local
1099 queue.add(new QueueItem(description, id)); in testSeriesOfSetQueue()
1109 mSession.setQueue(queue); in testSeriesOfSetQueue()
1119 List<QueueItem> queue = new ArrayList<>(); in testSetQueueWithLargeNumberOfItems() local
1123 queue.add(new QueueItem(description, id)); in testSetQueueWithLargeNumberOfItems()
[all …]
/cts/hostsidetests/telephony/devicetest/src/android/telephony/device/cts/
DTelephonyTest.java80 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue<>(1); in testListenerRegistrationWithChangeEnabled() local
84 queue.offer(true); in testListenerRegistrationWithChangeEnabled()
103 Boolean result = queue.poll(TEST_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in testListenerRegistrationWithChangeEnabled()
116 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue<>(1); in testListenerRegistrationWithChangeDisabled() local
120 queue.offer(true); in testListenerRegistrationWithChangeDisabled()
129 Boolean result = queue.poll(TEST_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in testListenerRegistrationWithChangeDisabled()
/cts/tests/tests/telephony/current/src/android/telephony/cts/util/
DDefaultSmsAppHelper.java144 LinkedBlockingQueue<Boolean> queue = new LinkedBlockingQueue<>(1); in setDefaultSmsApp() local
151 Runnable::run, queue::offer)); in setDefaultSmsApp()
157 Runnable::run, queue::offer)); in setDefaultSmsApp()
159 result = queue.poll(10, TimeUnit.SECONDS); in setDefaultSmsApp()
/cts/tests/inputmethod/util/src/android/view/inputmethod/cts/util/
DWindowFocusStealer.java104 final BlockingQueue<IWindowFocusStealer> queue = new ArrayBlockingQueue<>(1); in connect() local
108 queue.add(IWindowFocusStealer.Stub.asInterface(service)); in connect()
121 focusStealer = queue.poll(timeout, TimeUnit.MILLISECONDS); in connect()
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/
DBindDeviceAdminServiceGoodSetupTest.java182 final LinkedBlockingQueue<IInterface> queue = new LinkedBlockingQueue<>(); in assertCrossProfileCall() local
191 queue.add(NOT_IN_MAIN_THREAD_POISON_PILL); in assertCrossProfileCall()
194 queue.add(ICrossUserService.Stub.asInterface(service)); in assertCrossProfileCall()
204 IInterface service = queue.poll(5, TimeUnit.SECONDS); in assertCrossProfileCall()
/cts/libs/deviceutillegacy/src/android/webkit/cts/
DWebkitUtils.java173 public static <T> T waitForNextQueueElement(BlockingQueue<T> queue) { in waitForNextQueueElement() argument
175 T value = queue.poll(TEST_TIMEOUT_MS, TimeUnit.MILLISECONDS); in waitForNextQueueElement()
/cts/hostsidetests/adpf/app/hintsession/src/cpp/external/
Dandroid_native_app_glue.c412 static void onInputQueueCreated(ANativeActivity* activity, AInputQueue* queue) { in onInputQueueCreated() argument
413 LOGV("InputQueueCreated: %p -- %p\n", activity, queue); in onInputQueueCreated()
414 android_app_set_input((struct android_app*)activity->instance, queue); in onInputQueueCreated()
417 static void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue) { in onInputQueueDestroyed() argument
418 UNUSED(queue); in onInputQueueDestroyed()
419 LOGV("InputQueueDestroyed: %p -- %p\n", activity, queue); in onInputQueueDestroyed()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/
DUsbDeviceTestActivity.java479 receiveZero.queue(zeroBuffer, 1); in receiveZeroSizeRequestLegacy()
551 boolean wasQueued = receive.queue(bufferReceivedSliced, size); in echoUsbRequestLegacy()
553 wasQueued = sent.queue(bufferSentSliced, size); in echoUsbRequestLegacy()
616 receiveZero.queue(zeroBuffer); in receiveZeroSizeRequest()
690 boolean wasQueued = receive.queue(bufferReceivedSliced); in echoUsbRequest()
692 wasQueued = sent.queue(bufferSentSliced); in echoUsbRequest()
783 boolean wasQueued = receive.queue(bufferReceived, totalSize); in echoLargeUsbRequestLegacy()
785 wasQueued = sent.queue(bufferSent, totalSize); in echoLargeUsbRequestLegacy()
838 reqQueued.queue(buffer);
870 boolean isQueued = sent.queue(buffer, 0);
[all …]
/cts/tests/autofillservice/src/android/autofillservice/cts/activities/
DGridActivity.java144 final BlockingQueue<String> queue = new LinkedBlockingQueue<>(1); in getText() local
145 onCell(row, column, (c) -> Helper.offer(queue, c.getText().toString(), timeoutMs)); in getText()
146 final String text = queue.poll(timeoutMs, TimeUnit.MILLISECONDS); in getText()
/cts/tests/tests/media/codec/src/android/media/codec/cts/
DMediaCodecBlockModelTest.java308 final LinkedBlockingQueue<MediaCodecAsyncHelper.SlotEvent> queue = in runEncodeShortVideo() local
313 queue.offer(new MediaCodecAsyncHelper.SlotEvent(true, index)); in runEncodeShortVideo()
319 queue.offer(new MediaCodecAsyncHelper.SlotEvent(false, index)); in runEncodeShortVideo()
342 event = queue.take(); in runEncodeShortVideo()
393 .queue(); in runEncodeShortVideo()
/cts/tests/tests/webkit/src/android/webkit/cts/
DPostMessageTest.java209 final BlockingQueue<String> queue = new ArrayBlockingQueue<>(messageCount); in testMessageChannel() local
217 queue.add(message.getData()); in testMessageChannel()
228 WebkitUtils.waitForNextQueueElement(queue)); in testMessageChannel()
/cts/tests/input/src/android/input/cts/
DTwoWindowsActivity.kt41 private fun assertNoEvents(queue: LinkedBlockingQueue<InputEvent>) { in <lambda>()
42 val event = queue.poll(100, TimeUnit.MILLISECONDS) in <lambda>()
/cts/tests/tests/media/common/src/android/media/cts/
DMediaCodecBlockModelHelper.java220 request.queue(); in onInputSlot()
431 … final LinkedBlockingQueue<MediaCodecAsyncHelper.SlotEvent> queue = new LinkedBlockingQueue<>(); in runComponentWithLinearInput() local
435 queue.offer(new MediaCodecAsyncHelper.SlotEvent(true, index)); in runComponentWithLinearInput()
441 queue.offer(new MediaCodecAsyncHelper.SlotEvent(false, index)); in runComponentWithLinearInput()
479 event = queue.take(); in runComponentWithLinearInput()
/cts/tests/media/common/src/android/mediav2/common/cts/
DCodecEncoderBlockModelTestBase.java83 request.queue(); in enqueueEOS()
132 request.queue(); in enqueueInput()
/cts/tests/tests/telephony/current/src/android/telephony/ims/cts/
DMmTelFeatureTestOnMockModem.java663 private <T> T waitForResult(LinkedBlockingQueue<T> queue) throws Exception { in waitForResult() argument
664 return queue.poll(ImsUtils.TEST_TIMEOUT_MS, TimeUnit.MILLISECONDS); in waitForResult()
667 private int waitForIntResult(LinkedBlockingQueue<Integer> queue) throws Exception { in waitForIntResult() argument
668 Integer result = queue.poll(ImsUtils.TEST_TIMEOUT_MS, TimeUnit.MILLISECONDS); in waitForIntResult()
672 private int waitForIntResult(LinkedBlockingQueue<Integer> queue, int timeout) in waitForIntResult() argument
674 Integer result = queue.poll(timeout, TimeUnit.MILLISECONDS); in waitForIntResult()

123