Lower severity for invalid accessibility hover event stream to ERROR.

LOG(FATAL) crashes the device, which is very severe for the user.

The accessibility hover event stream has consistency issues that we
are actively fixing, but these fixes have not yet had time to soak.
Instead of cherrypicking the fix, instead we can demote the severity
of the log so that errors do not crash the device.

Bug: 286037469
Test: atest InputDispatcherTest#InvalidA11yHoverStreamDoesNotCrash
Test: Use talkback, repeatedly enter touch exploration while also
      tapping with another finger. Eventually observe the failure
      message which is now an ERROR instead of crashing the device
      with a FATAL.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2f99cdb9150461c6b77c29b31cbf5792a9303c95)
Merged-In: Iceea086345691cdad8ca5e092629de094d666de1
Change-Id: Iceea086345691cdad8ca5e092629de094d666de1
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index fbbb388..7bac534 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -662,7 +662,15 @@
         } else {
             // This pointer was already sent to the window. Use ACTION_HOVER_MOVE.
             if (CC_UNLIKELY(maskedAction != AMOTION_EVENT_ACTION_HOVER_MOVE)) {
-                LOG(FATAL) << "Expected ACTION_HOVER_MOVE instead of " << entry.getDescription();
+                android::base::LogSeverity severity = android::base::LogSeverity::FATAL;
+                if (entry.flags & AMOTION_EVENT_FLAG_IS_ACCESSIBILITY_EVENT) {
+                    // The Accessibility injected touch exploration event stream
+                    // has known inconsistencies, so log ERROR instead of
+                    // crashing the device with FATAL.
+                    // TODO(b/286037469): Move a11y severity back to FATAL.
+                    severity = android::base::LogSeverity::ERROR;
+                }
+                LOG(severity) << "Expected ACTION_HOVER_MOVE instead of " << entry.getDescription();
             }
             touchedWindow.targetFlags = InputTarget::Flags::DISPATCH_AS_IS;
         }