InputDispatcher: Reset touched window dispatch mode to AS_IS

After generating input targets for an event, reset all touched windows'
dispatch mode to AS_IS, since the dispatch mode in touched window should
only be used for generating the targets.

Bug: 210460522
Test: atest inpuflinger_tests
Change-Id: I7288b24fe232a780d5dc283420d6f2b103ef0691
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index a4529e6..b8cdb3d 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -2682,11 +2682,10 @@
 
     outInjectionResult = InputEventInjectionResult::SUCCEEDED;
 
+    // Now that we have generated all of the input targets for this event, reset the dispatch
+    // mode for all touched window to AS_IS.
     for (TouchedWindow& touchedWindow : tempTouchState.windows) {
-        // Targets that we entered in a slippery way will now become AS-IS targets
-        if (touchedWindow.dispatchMode == InputTarget::DispatchMode::SLIPPERY_ENTER) {
-            touchedWindow.dispatchMode = InputTarget::DispatchMode::AS_IS;
-        }
+        touchedWindow.dispatchMode = InputTarget::DispatchMode::AS_IS;
     }
 
     // Update final pieces of touch state if the injector had permission.