Home
last modified time | relevance | path

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

1234

/frameworks/native/services/inputflinger/benchmarks/
DInputDispatcher_benchmarks.cpp106 auto dispatcher = std::make_unique<InputDispatcher>(fakePolicy); in benchmarkNotifyMotion() local
107 dispatcher->setInputDispatchMode(/*enabled*/ true, /*frozen*/ false); in benchmarkNotifyMotion()
108 dispatcher->start(); in benchmarkNotifyMotion()
113 sp<FakeWindowHandle>::make(application, dispatcher, "Fake Window", DISPLAY_ID); in benchmarkNotifyMotion()
115 dispatcher->onWindowInfosChanged({{*window->getInfo()}, {}, 0, 0}); in benchmarkNotifyMotion()
124 dispatcher->notifyMotion(motionArgs); in benchmarkNotifyMotion()
129 dispatcher->notifyMotion(motionArgs); in benchmarkNotifyMotion()
135 dispatcher->stop(); in benchmarkNotifyMotion()
141 auto dispatcher = std::make_unique<InputDispatcher>(fakePolicy); in benchmarkInjectMotion() local
142 dispatcher->setInputDispatchMode(/*enabled*/ true, /*frozen*/ false); in benchmarkInjectMotion()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/audio/
DDeviceVolumeBehaviorTest.java105 TestDeviceVolumeBehaviorDispatcherStub dispatcher = in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher() local
107 mAudioService.registerDeviceVolumeBehaviorDispatcher(true, dispatcher); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
114 dispatcher.reset(); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
118 assertThat(dispatcher.mTimesCalled).isEqualTo(1); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
119 assertThat(dispatcher.mDevice).isEqualTo(DEVICE_SPEAKER_OUT); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
121 + " but was instead " + dispatcher.mVolumeBehavior) in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
122 .that(dispatcher.mVolumeBehavior).isEqualTo(behavior); in setToNewBehavior_triggersDeviceVolumeBehaviorDispatcher()
132 TestDeviceVolumeBehaviorDispatcherStub dispatcher = in setToSameBehavior_doesNotTriggerDeviceVolumeBehaviorDispatcher() local
134 mAudioService.registerDeviceVolumeBehaviorDispatcher(true, dispatcher); in setToSameBehavior_doesNotTriggerDeviceVolumeBehaviorDispatcher()
139 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
113 if (isNotInstantAppAndKeyguardRestricted(dispatcher)) { in onKeyDown()
117 dispatcher.startTracking(event, this); in onKeyDown()
118 } else if (event.isLongPress() && dispatcher.isTracking(event)) { in onKeyDown()
119 dispatcher.performedLongPress(event); in onKeyDown()
139 if (isNotInstantAppAndKeyguardRestricted(dispatcher)) { in onKeyDown()
143 dispatcher.startTracking(event, this); in onKeyDown()
144 } else if (event.isLongPress() && dispatcher.isTracking(event)) { in onKeyDown()
145 dispatcher.performedLongPress(event); in onKeyDown()
163 if (isNotInstantAppAndKeyguardRestricted(dispatcher)) { in onKeyDown()
[all …]
/frameworks/native/services/inputflinger/tests/fuzzers/
DInputDispatcherFuzzer.cpp92 std::unique_ptr<InputDispatcher>& dispatcher, in generateFuzzedWindow() argument
98 sp<FakeWindowHandle>::make(application, dispatcher, windowName, displayId); in generateFuzzedWindow()
106 FuzzedDataProvider& fdp, std::unique_ptr<InputDispatcher>& dispatcher) { in randomizeWindows() argument
115 windows.push_back(generateFuzzedWindow(fdp, dispatcher, displayId)); in randomizeWindows()
147 auto dispatcher = std::make_unique<InputDispatcher>(fakePolicy); in LLVMFuzzerTestOneInput() local
148 dispatcher->setInputDispatchMode(/*enabled=*/true, /*frozen=*/false); in LLVMFuzzerTestOneInput()
150 dispatcher->start(); in LLVMFuzzerTestOneInput()
160 dispatcher->notifyMotion(*motion); in LLVMFuzzerTestOneInput()
165 randomizeWindows(/*byref*/ windowsPerDisplay, fdp, dispatcher); in LLVMFuzzerTestOneInput()
174 dispatcher->onWindowInfosChanged( in LLVMFuzzerTestOneInput()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/
DCoroutineTestScopeModule.kt36 @get:Provides val dispatcher: TestDispatcher, constant in com.android.systemui.CoroutineTestScopeModule
37 @get:Provides val scheduler: TestCoroutineScheduler = dispatcher.scheduler,
56 @Binds @Main fun bindMainContext(dispatcher: TestDispatcher): CoroutineContext
57 @Binds @Main fun bindMainDispatcher(dispatcher: TestDispatcher): CoroutineDispatcher
58 @Binds @Background fun bindBgContext(dispatcher: TestDispatcher): CoroutineContext
59 @Binds @Background fun bindBgDispatcher(dispatcher: TestDispatcher): CoroutineDispatcher
/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/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/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/libs/systemui/weathereffects/src/com/google/android/wallpaper/weathereffects/data/repository/
DWallpaperFileUtils.kt42 dispatcher: CoroutineDispatcher = Dispatchers.IO, in export()
46 withContext(dispatcher) { in export()
80 dispatcher: CoroutineDispatcher = Dispatchers.IO, in importBitmapFromAbsolutePath()
83 withContext(dispatcher) { in importBitmapFromAbsolutePath()
107 dispatcher: CoroutineDispatcher = Dispatchers.IO, in importBitmapFromLocalStorage()
110 withContext(dispatcher) { in importBitmapFromLocalStorage()
/frameworks/base/media/java/android/media/
DLoudnessCodecController.java112 final LoudnessCodecDispatcher dispatcher = new LoudnessCodecDispatcher( in create() local
114 final LoudnessCodecController controller = new LoudnessCodecController(dispatcher, in create()
116 dispatcher.addLoudnessCodecListener(controller, Executors.newSingleThreadExecutor(), in create()
118 dispatcher.startLoudnessCodecUpdates(sessionId); in create()
144 final LoudnessCodecDispatcher dispatcher = new LoudnessCodecDispatcher( in create() local
146 final LoudnessCodecController controller = new LoudnessCodecController(dispatcher, in create()
148 dispatcher.addLoudnessCodecListener(controller, executor, listener); in create()
149 dispatcher.startLoudnessCodecUpdates(sessionId); in create()
176 final LoudnessCodecDispatcher dispatcher = new LoudnessCodecDispatcher(service); in createForTesting() local
177 final LoudnessCodecController controller = new LoudnessCodecController(dispatcher, in createForTesting()
[all …]
DIAudioService.aidl476 void registerStrategyPreferredDevicesDispatcher(IStrategyPreferredDevicesDispatcher dispatcher); in registerStrategyPreferredDevicesDispatcher() argument
479 IStrategyPreferredDevicesDispatcher dispatcher); in unregisterStrategyPreferredDevicesDispatcher() argument
482 IStrategyNonDefaultDevicesDispatcher dispatcher); in registerStrategyNonDefaultDevicesDispatcher() argument
485 IStrategyNonDefaultDevicesDispatcher dispatcher); in unregisterStrategyNonDefaultDevicesDispatcher() argument
511 void registerCapturePresetDevicesRoleDispatcher(ICapturePresetDevicesRoleDispatcher dispatcher); in registerCapturePresetDevicesRoleDispatcher() argument
514 ICapturePresetDevicesRoleDispatcher dispatcher); in unregisterCapturePresetDevicesRoleDispatcher() argument
542 void registerCommunicationDeviceDispatcher(ICommunicationDeviceDispatcher dispatcher); in registerCommunicationDeviceDispatcher() argument
545 ICommunicationDeviceDispatcher dispatcher); in unregisterCommunicationDeviceDispatcher() argument
587 void registerModeDispatcher(IAudioModeDispatcher dispatcher); in registerModeDispatcher() argument
589 oneway void unregisterModeDispatcher(IAudioModeDispatcher dispatcher); in unregisterModeDispatcher() argument
[all …]
/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/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/bluetooth/
DFakeBluetoothRepository.kt35 private val dispatcher = StandardTestDispatcher(scheduler) constant
36 private val testScope = TestScope(dispatcher)
39 BluetoothRepositoryImpl(testScope.backgroundScope, dispatcher, localBluetoothManager)
DBluetoothRepositoryImplTest.kt43 private lateinit var dispatcher: TestDispatcher in <lambda>() variable in com.android.systemui.statusbar.policy.bluetooth.BluetoothRepositoryImplTest
55 dispatcher = StandardTestDispatcher(scheduler) in <lambda>()
56 testScope = TestScope(dispatcher) in <lambda>()
59 BluetoothRepositoryImpl(testScope.backgroundScope, dispatcher, localBluetoothManager) in <lambda>()
78 dispatcher, in <lambda>()
/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/media/java/android/media/midi/
DMidiDeviceServer.java173 MidiDispatcher dispatcher = mOutputPortDispatchers[portNumber]; in close() local
174 synchronized (dispatcher) { in close()
175 dispatcher.getSender().disconnect(mInputPort); in close()
176 int openCount = dispatcher.getReceiverCount(); in close()
308 MidiDispatcher dispatcher = mOutputPortDispatchers[portNumber];
309 synchronized (dispatcher) {
310 dispatcher.getSender().connect(inputPort);
311 int openCount = dispatcher.getReceiverCount();
360 MidiDispatcher dispatcher = mOutputPortDispatchers[outputPortNumber];
361 synchronized (dispatcher) {
[all …]
/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/keyguard/data/repository/
DKeyguardClockRepositoryTest.kt48 private lateinit var dispatcher: CoroutineDispatcher variable in com.android.systemui.keyguard.data.repository.KeyguardClockRepositoryTest
62 dispatcher = StandardTestDispatcher(scheduler) in setup()
63 scope = TestScope(dispatcher) in setup()
69 dispatcher, in setup()
DKeyguardSmartspaceRepositoryImplTest.kt42 private lateinit var dispatcher: CoroutineDispatcher variable in com.android.systemui.keyguard.data.repository.KeyguardSmartspaceRepositoryImplTest
56 dispatcher = StandardTestDispatcher(scheduler) in setup()
57 scope = TestScope(dispatcher) in setup()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bluetooth/qsdialog/
DBluetoothTileDialogViewModelTest.kt113 private lateinit var dispatcher: CoroutineDispatcher variable in com.android.systemui.bluetooth.qsdialog.BluetoothTileDialogViewModelTest
119 dispatcher = UnconfinedTestDispatcher(scheduler) in setUp()
120 testScope = TestScope(dispatcher) in setUp()
129 dispatcher in setUp()
137 dispatcher in setUp()
145 dispatcher, in setUp()
146 dispatcher, in setUp()
DBluetoothTileDialogDelegateTest.kt95 private lateinit var dispatcher: CoroutineDispatcher variable in com.android.systemui.bluetooth.qsdialog.BluetoothTileDialogDelegateTest
104 dispatcher = UnconfinedTestDispatcher(scheduler) in setUp()
105 testScope = TestScope(dispatcher) in setUp()
115 dispatcher, in setUp()
215 dispatcher, in testDeviceItemViewHolder_cachedDeviceBusy()
270 dispatcher, in testShowDialog_cachedHeightLargerThanMinHeight_displayFromCachedHeight()
293 dispatcher, in testShowDialog_cachedHeightLessThanMinHeight_displayFromUiProperties()
316 dispatcher, in testShowDialog_bluetoothEnabled_autoOnToggleGone()

1234