Home
last modified time | relevance | path

Searched refs:dispatcher (Results 1 – 25 of 47) sorted by relevance

12

/frameworks/native/services/inputflinger/benchmarks/
DInputDispatcher_benchmarks.cpp159 explicit FakeInputReceiver(InputDispatcher& dispatcher, const std::string name) { in FakeInputReceiver() argument
160 Result<std::unique_ptr<InputChannel>> channelResult = dispatcher.createInputChannel(name); in FakeInputReceiver()
179 InputDispatcher& dispatcher, const std::string name) in FakeWindowHandle() argument
180 : FakeInputReceiver(dispatcher, name), mFrame(Rect(0, 0, WIDTH, HEIGHT)) { in FakeWindowHandle()
264 InputDispatcher dispatcher(fakePolicy); in benchmarkNotifyMotion() local
265 dispatcher.setInputDispatchMode(/*enabled*/ true, /*frozen*/ false); in benchmarkNotifyMotion()
266 dispatcher.start(); in benchmarkNotifyMotion()
270 sp<FakeWindowHandle> window = new FakeWindowHandle(application, dispatcher, "Fake Window"); in benchmarkNotifyMotion()
272 dispatcher.setInputWindows({{ADISPLAY_ID_DEFAULT, {window}}}); in benchmarkNotifyMotion()
281 dispatcher.notifyMotion(&motionArgs); in benchmarkNotifyMotion()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/audio/
DDeviceVolumeBehaviorTest.java94 TestDeviceVolumeBehaviorDispatcherStub dispatcher = in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher() local
96 mAudioService.registerDeviceVolumeBehaviorDispatcher(true, dispatcher); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
103 dispatcher.reset(); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
107 assertThat(dispatcher.mTimesCalled).isEqualTo(1); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
108 assertThat(dispatcher.mDevice).isEqualTo(DEVICE_SPEAKER_OUT); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
110 + " but was instead " + dispatcher.mVolumeBehavior) in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
111 .that(dispatcher.mVolumeBehavior).isEqualTo(behavior); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
121 TestDeviceVolumeBehaviorDispatcherStub dispatcher = in setToSameBehavior_doesNotTriggerDeviceVolumeBehaviorDispatcher() local
123 mAudioService.registerDeviceVolumeBehaviorDispatcher(true, dispatcher); in setToSameBehavior_doesNotTriggerDeviceVolumeBehaviorDispatcher()
128 assertThat(dispatcher.mTimesCalled).isEqualTo(0); in setToSameBehavior_doesNotTriggerDeviceVolumeBehaviorDispatcher()
[all …]
/frameworks/base/core/java/com/android/internal/policy/
DPhoneFallbackEventHandler.java86 final KeyEvent.DispatcherState dispatcher = mView.getKeyDispatcherState(); in onKeyDown() local
114 if (isNotInstantAppAndKeyguardRestricted(dispatcher)) { in onKeyDown()
118 dispatcher.startTracking(event, this); in onKeyDown()
119 } else if (event.isLongPress() && dispatcher.isTracking(event)) { in onKeyDown()
120 dispatcher.performedLongPress(event); in onKeyDown()
140 if (isNotInstantAppAndKeyguardRestricted(dispatcher)) { in onKeyDown()
144 dispatcher.startTracking(event, this); in onKeyDown()
145 } else if (event.isLongPress() && dispatcher.isTracking(event)) { in onKeyDown()
146 dispatcher.performedLongPress(event); in onKeyDown()
164 if (isNotInstantAppAndKeyguardRestricted(dispatcher)) { in onKeyDown()
[all …]
/frameworks/base/core/java/android/speech/tts/
DAudioPlaybackQueueItem.java38 AudioPlaybackQueueItem(UtteranceProgressDispatcher dispatcher, in AudioPlaybackQueueItem() argument
41 super(dispatcher, callerIdentity); in AudioPlaybackQueueItem()
53 final UtteranceProgressDispatcher dispatcher = getDispatcher(); in run() local
55 dispatcher.dispatchOnStart(); in run()
62 dispatcher.dispatchOnError(TextToSpeech.ERROR_OUTPUT); in run()
93 dispatcher.dispatchOnSuccess(); in run()
95 dispatcher.dispatchOnStop(); in run()
DSynthesisPlaybackQueueItem.java80 int audioFormat, int channelCount, UtteranceProgressDispatcher dispatcher, in SynthesisPlaybackQueueItem() argument
82 super(dispatcher, callerIdentity); in SynthesisPlaybackQueueItem()
102 final UtteranceProgressDispatcher dispatcher = getDispatcher(); in run() local
103 dispatcher.dispatchOnStart(); in run()
106 dispatcher.dispatchOnError(TextToSpeech.ERROR_OUTPUT); in run()
138 final UtteranceProgressDispatcher dispatcher = getDispatcher(); in dispatchEndStatus() local
141 dispatcher.dispatchOnSuccess(); in dispatchEndStatus()
143 dispatcher.dispatchOnStop(); in dispatchEndStatus()
145 dispatcher.dispatchOnError(mStatusCode); in dispatchEndStatus()
DPlaybackQueueItem.java11 PlaybackQueueItem(TextToSpeechService.UtteranceProgressDispatcher dispatcher, in PlaybackQueueItem() argument
13 mDispatcher = dispatcher; in PlaybackQueueItem()
DSilencePlaybackQueueItem.java25 SilencePlaybackQueueItem(UtteranceProgressDispatcher dispatcher, in SilencePlaybackQueueItem() argument
27 super(dispatcher, callerIdentity); in SilencePlaybackQueueItem()
/frameworks/native/libs/vr/libpdx/fuzz/
Dservice_dispatcher_fuzzer.cpp41 std::unique_ptr<ServiceDispatcher> dispatcher = ServiceDispatcher::Create(); in LLVMFuzzerTestOneInput() local
48 dispatcher->AddService(service); in LLVMFuzzerTestOneInput()
58 dispatcher_operations[opt](dispatcher, &fdp); in LLVMFuzzerTestOneInput()
68 dispatcher->SetCanceled(true); in LLVMFuzzerTestOneInput()
71 dispatcher->RemoveService(service); in LLVMFuzzerTestOneInput()
Dhelpers.h42 [](const std::unique_ptr<ServiceDispatcher>& dispatcher,
43 FuzzedDataProvider*) -> void { dispatcher->EnterDispatchLoop(); },
44 [](const std::unique_ptr<ServiceDispatcher>& dispatcher,
45 FuzzedDataProvider*) -> void { dispatcher->ReceiveAndDispatch(); },
46 [](const std::unique_ptr<ServiceDispatcher>& dispatcher,
48 dispatcher->ReceiveAndDispatch(fdp->ConsumeIntegral<int>());
/frameworks/native/services/vr/bufferhubd/
Dbufferhubd.cpp13 std::unique_ptr<android::pdx::ServiceDispatcher> dispatcher; in main() local
35 dispatcher = android::pdx::ServiceDispatcher::Create(); in main()
36 CHECK_ERROR(!dispatcher, error, "Failed to create service dispatcher\n"); in main()
40 dispatcher->AddService(pdx_service); in main()
47 ret = dispatcher->EnterDispatchLoop(); in main()
/frameworks/native/services/vr/performanced/
Dmain.cpp31 std::unique_ptr<android::pdx::ServiceDispatcher> dispatcher; in main() local
61 dispatcher = android::pdx::ServiceDispatcher::Create(); in main()
62 CHECK_ERROR(!dispatcher, error, "Failed to create service dispatcher."); in main()
66 dispatcher->AddService(service); in main()
70 ret = dispatcher->EnterDispatchLoop(); in main()
/frameworks/base/media/java/android/media/midi/
DMidiDeviceServer.java154 MidiDispatcher dispatcher = mOutputPortDispatchers[portNumber]; in close() local
155 synchronized (dispatcher) { in close()
156 dispatcher.getSender().disconnect(mInputPort); in close()
157 int openCount = dispatcher.getReceiverCount(); in close()
246 MidiDispatcher dispatcher = mOutputPortDispatchers[portNumber];
247 synchronized (dispatcher) {
248 dispatcher.getSender().connect(inputPort);
249 int openCount = dispatcher.getReceiverCount();
298 MidiDispatcher dispatcher = mOutputPortDispatchers[outputPortNumber];
299 synchronized (dispatcher) {
[all …]
/frameworks/base/packages/SystemUI/docs/
Dbroadcasts.md3 ## What is this dispatcher?
5 This is an internal dispatcher class for global broadcasts that SystemUI components want to receive…
7 ## Why use the dispatcher?
13 * The dispatcher immediately moves out of the main thread upon broadcast, giving back control to `s…
14 * The dispatcher significantly reduces time spent in main thread by handling most operations in a b…
16 ## Should I use the dispatcher?
18 The dispatcher supports `BroadcastReceiver` dynamic subscriptions in the following cases:
26 Additionally, the dispatcher supports the following:
33 …ed in `AndroidManifest`) that satisfies the constraints above, use the dispatcher to reduce the lo…
47 * Do not use the dispatcher to obtain the last broadcast (by passing a null `BroadcastReceiver`). `…
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/data/repository/
DPowerRepository.kt44 dispatcher: BroadcastDispatcher,
59 dispatcher.registerReceiver( in <lambda>()
68 awaitClose { dispatcher.unregisterReceiver(receiver) } in <lambda>()
/frameworks/native/libs/vr/libpdx/
Dservice_dispatcher.cpp17 std::unique_ptr<ServiceDispatcher> dispatcher{new ServiceDispatcher()}; in Create() local
18 if (!dispatcher->epoll_fd_ || !dispatcher->event_fd_) { in Create()
19 dispatcher.reset(); in Create()
22 return dispatcher; in Create()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/data/repository/
DPowerRepositoryImplTest.kt51 @Mock private lateinit var dispatcher: BroadcastDispatcher variable in com.android.systemui.power.data.repository.PowerRepositoryImplTest
65 underTest = PowerRepositoryImpl(manager = manager, dispatcher = dispatcher) in setUp()
88 verify(dispatcher).unregisterReceiver(receiverCaptor.value) in isInteractive - unregisters from broadcasts()
167 verify(dispatcher) in verifyRegistered()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DBackNavigationControllerTests.java176 WindowOnBackInvokedDispatcher dispatcher = in testUnregisterCallbacksWithSystemCallback() local
184 dispatcher.attachToWindow(appWindow.mSession, appWindow.mClient); in testUnregisterCallbacksWithSystemCallback()
191 dispatcher.registerSystemOnBackInvokedCallback(systemCallback); in testUnregisterCallbacksWithSystemCallback()
192 dispatcher.registerOnBackInvokedCallback(OnBackInvokedDispatcher.PRIORITY_DEFAULT, in testUnregisterCallbacksWithSystemCallback()
196 assertEquals(appCallback, dispatcher.getTopCallback()); in testUnregisterCallbacksWithSystemCallback()
199 dispatcher.unregisterOnBackInvokedCallback(appCallback); in testUnregisterCallbacksWithSystemCallback()
200 assertEquals(systemCallback, dispatcher.getTopCallback()); in testUnregisterCallbacksWithSystemCallback()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/kotlin/
DCoroutinesModule.kt20 @Main dispatcher: CoroutineDispatcher,
21 ): CoroutineScope = CoroutineScope(dispatcher)
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/flags/
DConditionalRestarterTest.kt42 val dispatcher = StandardTestDispatcher() constant
43 val testScope = TestScope(dispatcher)
57 dispatcher in setup()
/frameworks/base/media/java/android/media/
DIAudioService.aidl333 void registerStrategyPreferredDevicesDispatcher(IStrategyPreferredDevicesDispatcher dispatcher); in registerStrategyPreferredDevicesDispatcher() argument
336 IStrategyPreferredDevicesDispatcher dispatcher); in unregisterStrategyPreferredDevicesDispatcher() argument
357 void registerCapturePresetDevicesRoleDispatcher(ICapturePresetDevicesRoleDispatcher dispatcher); in registerCapturePresetDevicesRoleDispatcher() argument
360 ICapturePresetDevicesRoleDispatcher dispatcher); in unregisterCapturePresetDevicesRoleDispatcher() argument
384 void registerCommunicationDeviceDispatcher(ICommunicationDeviceDispatcher dispatcher); in registerCommunicationDeviceDispatcher() argument
387 ICommunicationDeviceDispatcher dispatcher); in unregisterCommunicationDeviceDispatcher() argument
412 void registerModeDispatcher(IAudioModeDispatcher dispatcher); in registerModeDispatcher() argument
414 oneway void unregisterModeDispatcher(IAudioModeDispatcher dispatcher); in unregisterModeDispatcher() argument
499 in IDeviceVolumeBehaviorDispatcher dispatcher); in registerDeviceVolumeBehaviorDispatcher() argument
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyboard/data/repository/
DKeyboardRepositoryTest.kt56 private lateinit var dispatcher: CoroutineDispatcher in <lambda>() variable in com.android.systemui.keyboard.data.repository.KeyboardRepositoryTest
67 dispatcher = StandardTestDispatcher() in <lambda>()
68 testScope = TestScope(dispatcher) in <lambda>()
69 underTest = KeyboardRepositoryImpl(testScope.backgroundScope, dispatcher, inputManager) in <lambda>()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/
DClockRegistryTest.kt52 private lateinit var dispatcher: CoroutineDispatcher variable in com.android.systemui.shared.clocks.ClockRegistryTest
102 dispatcher = StandardTestDispatcher() in setUp()
103 scope = TestScope(dispatcher) in setUp()
114 mainDispatcher = dispatcher, in setUp()
115 bgDispatcher = dispatcher, in setUp()
/frameworks/base/core/java/android/window/
DImeOnBackInvokedDispatcher.java58 WindowOnBackInvokedDispatcher dispatcher = getReceivingDispatcher(); in ImeOnBackInvokedDispatcher()
59 if (dispatcher != null) { in ImeOnBackInvokedDispatcher()
60 receive(resultCode, resultData, dispatcher); in ImeOnBackInvokedDispatcher()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/appselector/data/
DIconLoaderLibAppIconLoaderTest.kt48 private val dispatcher = Dispatchers.Unconfined constant
52 backgroundDispatcher = dispatcher,
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/
DNotifLiveDataStoreImpl.kt66 ).forEach { dispatcher -> dispatcher.invoke() } in <lambda>() method

12