summaryrefslogtreecommitdiff
path: root/include/powermanager/PowerHalController.h
diff options
context:
space:
mode:
author Egor Pasko <pasko@google.com> 2024-01-16 16:46:45 +0100
committer Egor Pasko <pasko@google.com> 2024-01-17 14:40:29 +0000
commit5a67a56008a340547eac4bb40eeb51b23a6c6f9d (patch)
treeaa115a8414e06154a56d2f4af00ecd374cab30db /include/powermanager/PowerHalController.h
parent55ea9f4abb2a7476c9106525d42d6aaf06b6fa2f (diff)
Add InputChannel::waitForMessage and use it in EndToEndNativeInputTest
The EndToEndNativeInputTest::waitForEventAvailable(timeoutMs) is similar in implementation to InputChannel::probablyHasInput(), but can stop after a timeout. Add InputChannel::waitForMessage(std::chrono::milliseconds timeout) for use in tests and use it to replace the waitForEventAvailable(). The difference of the new method from probablyHasInput() is that the latter does not get repeated (because it is not necessary to implement the hint). Repeating happens only on EINTR to allow tests to return before timeout expiration when there are problems with the channel setup. In the end the implementations are rather different. Bug: b/314973388 Test: atest frameworks/native/libs/gui/tests/EndToEndNativeInputTest.cpp Test: atest InputPublisherAndConsumerTest Change-Id: I806aad14e4fba223a5cbbe49cea862f9b8279f24
Diffstat (limited to 'include/powermanager/PowerHalController.h')
0 files changed, 0 insertions, 0 deletions