Reland "Set down time when event slips into Wallpaper" - try 2

This reverts commit bab35a607dee056d2280c2e23c1ddfe717f0ca86.

When touch slips into a window that also has a wallpaper, the wallpaper
should receive a slippery enter event, as well. We should also ensure
that the downTime is correctly set at this time. Otherwise, we will
encounter issues later, when trying to split motion events.

This can be reproduced by slipping touch from the navigationbar into
launcher and then pressing the navigation bar with other finger.

Bug: 354059964
Test: manually
1. Press navigationbar and move to launcher and hold.
2. Inject motionevent by "adb shell input swipe 500 1500 500 1000"
3. Press navigationbar by other finger.

Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="*WallpaperWindowWhenSlipperyAndMultiWindowMultiTouch"
Flag: EXEMPT bugfix

Change-Id: I1e77933a9656a6b9c93ab942ccf94a7aafefc169
diff --git a/services/inputflinger/dispatcher/InputDispatcher.h b/services/inputflinger/dispatcher/InputDispatcher.h
index 698bdba..87dfd1d 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.h
+++ b/services/inputflinger/dispatcher/InputDispatcher.h
@@ -709,11 +709,23 @@
 
     sp<InputReporterInterface> mReporter;
 
+    /**
+     * Slip the wallpaper touch if necessary.
+     *
+     * @param targetFlags the target flags
+     * @param oldWindowHandle the old window that the touch slipped out of
+     * @param newWindowHandle the new window that the touch is slipping into
+     * @param state the current touch state. This will be updated if necessary to reflect the new
+     *        windows that are receiving touch.
+     * @param deviceId the device id of the current motion being processed
+     * @param pointerProperties the pointer properties of the current motion being processed
+     * @param targets the current targets to add the walpaper ones to
+     * @param eventTime the new downTime for the wallpaper target
+     */
     void slipWallpaperTouch(ftl::Flags<InputTarget::Flags> targetFlags,
                             const sp<android::gui::WindowInfoHandle>& oldWindowHandle,
                             const sp<android::gui::WindowInfoHandle>& newWindowHandle,
-                            TouchState& state, DeviceId deviceId,
-                            const PointerProperties& pointerProperties,
+                            TouchState& state, const MotionEntry& entry,
                             std::vector<InputTarget>& targets) const REQUIRES(mLock);
     void transferWallpaperTouch(ftl::Flags<InputTarget::Flags> oldTargetFlags,
                                 ftl::Flags<InputTarget::Flags> newTargetFlags,