Pass source to dispatchBatchedInputEventPending (2/2)

The API requestUnbufferedDispatch allow View could receive the event in
unbuffered way. But doing processUnbufferedRequest in onInputEvent is
too late for the first event. Instead, we should pass the source of
the input event up to dispatchBatchedInputEventPending, and then we can
use that to determine whether we could consume event immediately or not.

Bug: 149715123
Test: atest ViewUnbufferedTest
Change-Id: I9cd6f76cc3ba74647b57036b3f4979efa8751b95
diff --git a/include/input/InputTransport.h b/include/input/InputTransport.h
index 8ca178c..7ca9031 100644
--- a/include/input/InputTransport.h
+++ b/include/input/InputTransport.h
@@ -404,6 +404,13 @@
      */
     bool hasPendingBatch() const;
 
+    /* Returns the source of first pending batch if exist.
+     *
+     * Should be called after calling consume() with consumeBatches == false to determine
+     * whether consume() should be called again later on with consumeBatches == true.
+     */
+    int32_t getPendingBatchSource() const;
+
 private:
     // True if touch resampling is enabled.
     const bool mResampleTouch;