Use chrono for dispatching timeout

To prevent confusion about the units of dispatchingTimeout, convert to
chrono.

Bug: 155931890
Test: atest inputflinger_tests
Change-Id: Icfcb3bad7188052a6b047b3cbe836be8d928fad2
diff --git a/include/input/InputWindow.h b/include/input/InputWindow.h
index 6740855..f8c759c 100644
--- a/include/input/InputWindow.h
+++ b/include/input/InputWindow.h
@@ -136,7 +136,7 @@
     std::string name;
     int32_t layoutParamsFlags = 0;
     int32_t layoutParamsType = 0;
-    nsecs_t dispatchingTimeout = -1;
+    std::chrono::nanoseconds dispatchingTimeout = std::chrono::seconds(5);
 
     /* These values are filled in by SurfaceFlinger. */
     int32_t frameLeft = -1;
@@ -227,10 +227,6 @@
         return !mInfo.name.empty() ? mInfo.name : "<invalid>";
     }
 
-    inline nsecs_t getDispatchingTimeout(nsecs_t defaultValue) const {
-        return mInfo.token ? mInfo.dispatchingTimeout : defaultValue;
-    }
-
     inline std::chrono::nanoseconds getDispatchingTimeout(
             std::chrono::nanoseconds defaultValue) const {
         return mInfo.token ? std::chrono::nanoseconds(mInfo.dispatchingTimeout) : defaultValue;