Loading include/input/InputApplication.h +2 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,8 @@ public: inline std::chrono::nanoseconds getDispatchingTimeout( std::chrono::nanoseconds defaultValue) const { return mInfo.token ? std::chrono::nanoseconds(mInfo.dispatchingTimeoutNanos) : defaultValue; return mInfo.token ? std::chrono::milliseconds(mInfo.dispatchingTimeoutMillis) : defaultValue; } inline sp<IBinder> getApplicationToken() const { Loading libs/gui/tests/EndToEndNativeInputTest.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,8 @@ private: InputApplicationInfo aInfo; aInfo.token = new BBinder(); aInfo.name = "Test app info"; aInfo.dispatchingTimeoutNanos = DISPATCHING_TIMEOUT.count(); aInfo.dispatchingTimeoutMillis = std::chrono::duration_cast<std::chrono::milliseconds>(DISPATCHING_TIMEOUT).count(); mInputInfo.applicationInfo = aInfo; } Loading libs/input/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,13 @@ // libinput is partially built for the host (used by build time keymap validation tool) filegroup { name: "inputconstants_aidl", srcs: [ "android/os/IInputConstants.aidl", ], } cc_library { name: "libinput", host_supported: true, Loading Loading @@ -61,6 +68,7 @@ cc_library { "VelocityTracker.cpp", "android/FocusRequest.aidl", "android/InputApplicationInfo.aidl", "android/os/IInputConstants.aidl", "android/os/IInputFlinger.aidl", "android/os/ISetInputWindowsListener.aidl", ], Loading libs/input/android/InputApplicationInfo.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -19,5 +19,5 @@ package android; parcelable InputApplicationInfo { @nullable IBinder token; @utf8InCpp String name; long dispatchingTimeoutNanos; long dispatchingTimeoutMillis; } libs/input/android/os/IInputConstants.aidl 0 → 100644 +24 −0 Original line number Diff line number Diff line /** * Copyright (c) 2020, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.os; /** @hide */ interface IInputConstants { const int DEFAULT_DISPATCHING_TIMEOUT_MILLIS = 5000; // 5 seconds } Loading
include/input/InputApplication.h +2 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,8 @@ public: inline std::chrono::nanoseconds getDispatchingTimeout( std::chrono::nanoseconds defaultValue) const { return mInfo.token ? std::chrono::nanoseconds(mInfo.dispatchingTimeoutNanos) : defaultValue; return mInfo.token ? std::chrono::milliseconds(mInfo.dispatchingTimeoutMillis) : defaultValue; } inline sp<IBinder> getApplicationToken() const { Loading
libs/gui/tests/EndToEndNativeInputTest.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,8 @@ private: InputApplicationInfo aInfo; aInfo.token = new BBinder(); aInfo.name = "Test app info"; aInfo.dispatchingTimeoutNanos = DISPATCHING_TIMEOUT.count(); aInfo.dispatchingTimeoutMillis = std::chrono::duration_cast<std::chrono::milliseconds>(DISPATCHING_TIMEOUT).count(); mInputInfo.applicationInfo = aInfo; } Loading
libs/input/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,13 @@ // libinput is partially built for the host (used by build time keymap validation tool) filegroup { name: "inputconstants_aidl", srcs: [ "android/os/IInputConstants.aidl", ], } cc_library { name: "libinput", host_supported: true, Loading Loading @@ -61,6 +68,7 @@ cc_library { "VelocityTracker.cpp", "android/FocusRequest.aidl", "android/InputApplicationInfo.aidl", "android/os/IInputConstants.aidl", "android/os/IInputFlinger.aidl", "android/os/ISetInputWindowsListener.aidl", ], Loading
libs/input/android/InputApplicationInfo.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -19,5 +19,5 @@ package android; parcelable InputApplicationInfo { @nullable IBinder token; @utf8InCpp String name; long dispatchingTimeoutNanos; long dispatchingTimeoutMillis; }
libs/input/android/os/IInputConstants.aidl 0 → 100644 +24 −0 Original line number Diff line number Diff line /** * Copyright (c) 2020, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.os; /** @hide */ interface IInputConstants { const int DEFAULT_DISPATCHING_TIMEOUT_MILLIS = 5000; // 5 seconds }