Rate limit user activity pokes in InputDispatcher

This rate limiting used to exist in PowerManager's JNI entry point.
Moving it to InputDispatcher helps us avoid building and sending the
request to the PowerManager JNI layer if the request is not going to be
sent to the Java layer.

We are also enabling configuration of this rate. Previously, a default
rate of 100ms per use-activity type was used. We have added an XML
config to allow overriding this value device-wide, for all user-activity
types. This helps devices adjust the rate as per their use cases.

Bug: 320499729
Test: atest InputDispatcherUserActivityPokeTests
Change-Id: I66fce1082e857b4d74b69e2d87d1a5fe1d9eb57c
diff --git a/services/inputflinger/dispatcher/include/InputDispatcherInterface.h b/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
index 001dc6c..c8f3d05 100644
--- a/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
+++ b/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
@@ -101,6 +101,9 @@
      */
     virtual void setFocusedDisplay(int32_t displayId) = 0;
 
+    /** Sets the minimum time between user activity pokes. */
+    virtual void setMinTimeBetweenUserActivityPokes(std::chrono::milliseconds interval) = 0;
+
     /* Sets the input dispatching mode.
      *
      * This method may be called on any thread (usually by the input manager).