Lines Matching refs:mDispatcher
191 sp<InputDispatcher> mDispatcher; member in android::InputDispatcherTest
196 mDispatcher = new InputDispatcher(mFakePolicy); in SetUp()
197 mDispatcher->setInputDispatchMode(/*enabled*/ true, /*frozen*/ false); in SetUp()
199 mDispatcherThread = new InputDispatcherThread(mDispatcher); in SetUp()
207 mDispatcher.clear(); in TearDown()
219 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
228 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
254 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
264 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
273 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
283 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
292 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
301 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
310 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
320 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
329 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
340 ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent( in TEST_F()
417 mDispatcher(dispatcher), mName(name), mDisplayId(displayId) { in FakeInputReceiver()
430 sp<InputDispatcher> mDispatcher; member in android::FakeInputReceiver
449 mDispatcher->registerInputChannel(mServerChannel, displayId); in FakeWindowHandle()
590 sp<FakeWindowHandle> window = new FakeWindowHandle(application, mDispatcher, "Fake Window", in TEST_F()
596 mDispatcher->setInputWindows(inputWindowHandles, ADISPLAY_ID_DEFAULT); in TEST_F()
597 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
608 sp<FakeWindowHandle> windowTop = new FakeWindowHandle(application, mDispatcher, "Top", in TEST_F()
610 sp<FakeWindowHandle> windowSecond = new FakeWindowHandle(application, mDispatcher, "Second", in TEST_F()
617 mDispatcher->setInputWindows(inputWindowHandles, ADISPLAY_ID_DEFAULT); in TEST_F()
618 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
629 sp<FakeWindowHandle> windowTop = new FakeWindowHandle(application, mDispatcher, "Top", in TEST_F()
631 sp<FakeWindowHandle> windowSecond = new FakeWindowHandle(application, mDispatcher, "Second", in TEST_F()
635 mDispatcher->setFocusedApplication(ADISPLAY_ID_DEFAULT, application); in TEST_F()
643 mDispatcher->setInputWindows(inputWindowHandles, ADISPLAY_ID_DEFAULT); in TEST_F()
644 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectKeyDown(mDispatcher)) in TEST_F()
654 sp<FakeWindowHandle> windowTop = new FakeWindowHandle(application, mDispatcher, "Top", in TEST_F()
656 sp<FakeWindowHandle> windowSecond = new FakeWindowHandle(application, mDispatcher, "Second", in TEST_F()
660 mDispatcher->setFocusedApplication(ADISPLAY_ID_DEFAULT, application); in TEST_F()
669 mDispatcher->setInputWindows(inputWindowHandles, ADISPLAY_ID_DEFAULT); in TEST_F()
670 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectKeyDown(mDispatcher)) in TEST_F()
681 sp<FakeWindowHandle> windowTop = new FakeWindowHandle(application, mDispatcher, "Top", in TEST_F()
683 sp<FakeWindowHandle> windowSecond = new FakeWindowHandle(application, mDispatcher, "Second", in TEST_F()
687 mDispatcher->setFocusedApplication(ADISPLAY_ID_DEFAULT, application); in TEST_F()
696 mDispatcher->setInputWindows(inputWindowHandles, ADISPLAY_ID_DEFAULT); in TEST_F()
699 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectKeyDown(mDispatcher)) in TEST_F()
715 windowInPrimary = new FakeWindowHandle(application1, mDispatcher, "D_1", in SetUp()
720 mDispatcher->setFocusedApplication(ADISPLAY_ID_DEFAULT, application1); in SetUp()
722 mDispatcher->setInputWindows(inputWindowHandles, ADISPLAY_ID_DEFAULT); in SetUp()
725 windowInSecondary = new FakeWindowHandle(application2, mDispatcher, "D_2", in SetUp()
731 mDispatcher->setFocusedDisplay(SECOND_DISPLAY_ID); in SetUp()
733 mDispatcher->setFocusedApplication(SECOND_DISPLAY_ID, application2); in SetUp()
735 mDispatcher->setInputWindows(inputWindowHandles_Second, SECOND_DISPLAY_ID); in SetUp()
756 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
763 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
772 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectKeyDown(mDispatcher, ADISPLAY_ID_DEFAULT)) in TEST_F()
778 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectKeyDown(mDispatcher)) in TEST_F()
785 mDispatcher->setInputWindows(noWindows, SECOND_DISPLAY_ID); in TEST_F()
792 ASSERT_EQ(INPUT_EVENT_INJECTION_TIMED_OUT, injectKeyDown(mDispatcher)) in TEST_F()
804 mDispatcher->registerInputMonitor(mServerChannel, displayId, isGestureMonitor); in FakeMonitorReceiver()
811 new FakeMonitorReceiver(mDispatcher, "M_1", ADISPLAY_ID_DEFAULT); in TEST_F()
813 new FakeMonitorReceiver(mDispatcher, "M_2", SECOND_DISPLAY_ID); in TEST_F()
816 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
825 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
836 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
849 new FakeMonitorReceiver(mDispatcher, "M_1", ADISPLAY_ID_DEFAULT); in TEST_F()
851 new FakeMonitorReceiver(mDispatcher, "M_2", SECOND_DISPLAY_ID); in TEST_F()
854 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectKeyDown(mDispatcher)) in TEST_F()
871 mDispatcher->notifyMotion(&motionArgs); in testNotifyMotion()
874 mDispatcher->notifyMotion(&motionArgs); in testNotifyMotion()
887 mDispatcher->notifyKey(&keyArgs); in testNotifyKey()
889 mDispatcher->notifyKey(&keyArgs); in testNotifyKey()
906 mDispatcher->setInputFilterEnabled(true); in TEST_F()
912 mDispatcher->setInputFilterEnabled(false); in TEST_F()
924 mDispatcher->setInputFilterEnabled(true); in TEST_F()
929 mDispatcher->setInputFilterEnabled(false); in TEST_F()
939 mUnfocusedWindow = new FakeWindowHandle(application, mDispatcher, "Top", in SetUp()
946 mWindowFocused = new FakeWindowHandle(application, mDispatcher, "Second", in SetUp()
953 mDispatcher->setFocusedApplication(ADISPLAY_ID_DEFAULT, application); in SetUp()
960 mDispatcher->setInputWindows(inputWindowHandles, ADISPLAY_ID_DEFAULT); in SetUp()
980 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
984 mDispatcher->monitor(); in TEST_F()
993 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
997 mDispatcher->monitor(); in TEST_F()
1005 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectKeyDown(mDispatcher, ADISPLAY_ID_DEFAULT)) in TEST_F()
1008 mDispatcher->monitor(); in TEST_F()
1018 ASSERT_EQ(INPUT_EVENT_INJECTION_SUCCEEDED, injectMotionDown(mDispatcher, in TEST_F()
1023 mDispatcher->monitor(); in TEST_F()