Loading services/inputflinger/benchmarks/InputDispatcher_benchmarks.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ using android::os::InputEventInjectionSync; namespace android::inputdispatcher { namespace { // An arbitrary device id. constexpr int32_t DEVICE_ID = 1; Loading Loading @@ -348,6 +350,8 @@ static void benchmarkOnWindowInfosChanged(benchmark::State& state) { dispatcher.stop(); } } // namespace BENCHMARK(benchmarkNotifyMotion); BENCHMARK(benchmarkInjectMotion); BENCHMARK(benchmarkOnWindowInfosChanged); Loading services/inputflinger/tests/FocusResolver_test.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ using android::gui::WindowInfoHandle; namespace android::inputdispatcher { namespace { class FakeWindowHandle : public WindowInfoHandle { public: FakeWindowHandle(const std::string& name, const sp<IBinder>& token, bool focusable, Loading @@ -49,6 +51,8 @@ public: } }; } // namespace TEST(FocusResolverTest, SetFocusedWindow) { sp<IBinder> focusableWindowToken = sp<BBinder>::make(); sp<IBinder> invisibleWindowToken = sp<BBinder>::make(); Loading services/inputflinger/tests/InputDispatcher_test.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -846,6 +846,8 @@ TEST_F(InputDispatcherTest, NotifySwitch_CallsPolicy) { mFakePolicy->assertNotifySwitchWasCalled(args); } namespace { // --- InputDispatcherTest SetInputWindowTest --- static constexpr std::chrono::duration INJECT_EVENT_TIMEOUT = 500ms; // Default input dispatching timeout if there is no focused application or paused window Loading Loading @@ -1592,6 +1594,8 @@ static NotifyPointerCaptureChangedArgs generatePointerCaptureChangedArgs( return NotifyPointerCaptureChangedArgs(/*id=*/0, systemTime(SYSTEM_TIME_MONOTONIC), request); } } // namespace /** * When a window unexpectedly disposes of its input channel, policy should be notified about the * broken channel. Loading Loading
services/inputflinger/benchmarks/InputDispatcher_benchmarks.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ using android::os::InputEventInjectionSync; namespace android::inputdispatcher { namespace { // An arbitrary device id. constexpr int32_t DEVICE_ID = 1; Loading Loading @@ -348,6 +350,8 @@ static void benchmarkOnWindowInfosChanged(benchmark::State& state) { dispatcher.stop(); } } // namespace BENCHMARK(benchmarkNotifyMotion); BENCHMARK(benchmarkInjectMotion); BENCHMARK(benchmarkOnWindowInfosChanged); Loading
services/inputflinger/tests/FocusResolver_test.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ using android::gui::WindowInfoHandle; namespace android::inputdispatcher { namespace { class FakeWindowHandle : public WindowInfoHandle { public: FakeWindowHandle(const std::string& name, const sp<IBinder>& token, bool focusable, Loading @@ -49,6 +51,8 @@ public: } }; } // namespace TEST(FocusResolverTest, SetFocusedWindow) { sp<IBinder> focusableWindowToken = sp<BBinder>::make(); sp<IBinder> invisibleWindowToken = sp<BBinder>::make(); Loading
services/inputflinger/tests/InputDispatcher_test.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -846,6 +846,8 @@ TEST_F(InputDispatcherTest, NotifySwitch_CallsPolicy) { mFakePolicy->assertNotifySwitchWasCalled(args); } namespace { // --- InputDispatcherTest SetInputWindowTest --- static constexpr std::chrono::duration INJECT_EVENT_TIMEOUT = 500ms; // Default input dispatching timeout if there is no focused application or paused window Loading Loading @@ -1592,6 +1594,8 @@ static NotifyPointerCaptureChangedArgs generatePointerCaptureChangedArgs( return NotifyPointerCaptureChangedArgs(/*id=*/0, systemTime(SYSTEM_TIME_MONOTONIC), request); } } // namespace /** * When a window unexpectedly disposes of its input channel, policy should be notified about the * broken channel. Loading