Add default input dispatching timeout constant
To use the same number consistently in java and native, add
IInputConstants interface where we will store the constants.
Bug: 161009325
Test: atest inputflinger_tests
Change-Id: I10f45547b1161e3768a134b38bf40d77a3a82f09
diff --git a/services/inputflinger/tests/InputDispatcher_test.cpp b/services/inputflinger/tests/InputDispatcher_test.cpp
index cc19cb1..c7bb2ac 100644
--- a/services/inputflinger/tests/InputDispatcher_test.cpp
+++ b/services/inputflinger/tests/InputDispatcher_test.cpp
@@ -584,7 +584,8 @@
FakeApplicationHandle() {
mInfo.name = "Fake Application";
mInfo.token = new BBinder();
- mInfo.dispatchingTimeoutNanos = DISPATCHING_TIMEOUT.count();
+ mInfo.dispatchingTimeoutMillis =
+ std::chrono::duration_cast<std::chrono::milliseconds>(DISPATCHING_TIMEOUT).count();
}
virtual ~FakeApplicationHandle() {}
@@ -592,8 +593,8 @@
return true;
}
- void setDispatchingTimeout(std::chrono::nanoseconds timeout) {
- mInfo.dispatchingTimeoutNanos = timeout.count();
+ void setDispatchingTimeout(std::chrono::milliseconds timeout) {
+ mInfo.dispatchingTimeoutMillis = timeout.count();
}
};