Synthesize cancel event to global monitor specify display id

When we failed to find WindowTarget, we will synthesize a cancel event
to globalMonitor, at this time, we should specify the displayId,
because globalMonitor is created according to the different display,
we didn't specify it before, so we add it now.

Bug: 314702448
Test: atest inputflinger_tests

Signed-off-by: Linnan Li <lilinnan@xiaomi.corp-partner.google.com>
(cherry picked from https://partner-android-review.googlesource.com/q/commit:e43c76ae092db81c6a7cb3c986055a2f994e72bc)
Merged-In: Ic748082383119b465caa41da8301746fefea2be9
Change-Id: Ic748082383119b465caa41da8301746fefea2be9
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index c349a58..d50e2b8 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -1961,6 +1961,7 @@
                 isPointerEvent ? CancelationOptions::Mode::CANCEL_POINTER_EVENTS
                                : CancelationOptions::Mode::CANCEL_NON_POINTER_EVENTS);
         CancelationOptions options(mode, "input event injection failed");
+        options.displayId = entry->displayId;
         synthesizeCancelationEventsForMonitorsLocked(options);
         return true;
     }