Add verifyInputEvent api to InputDispatcher

Now InputDispatcher will be able to check whether a certain InputEvent
is legitimate.
Use the 'verifyInputEvent' api to determine if a given 'InputEvent'
actually came from InputDispatcher.

Bug: 134977432
Test: atest VerifiedKeyEventTest VerifiedMotionEventTest libinput_tests
inputflinger_tests
Change-Id: I8e7fa9bfa3c14b0b0d949fb5e28b43ff7583398f
diff --git a/libs/input/tests/InputPublisherAndConsumer_test.cpp b/libs/input/tests/InputPublisherAndConsumer_test.cpp
index d4bbf6c..885196f 100644
--- a/libs/input/tests/InputPublisherAndConsumer_test.cpp
+++ b/libs/input/tests/InputPublisherAndConsumer_test.cpp
@@ -38,6 +38,7 @@
     virtual void SetUp() {
         status_t result = InputChannel::openInputChannelPair("channel name",
                 serverChannel, clientChannel);
+        ASSERT_EQ(OK, result);
 
         mPublisher = new InputPublisher(serverChannel);
         mConsumer = new InputConsumer(clientChannel);