summaryrefslogtreecommitdiff
path: root/libs/gui/BLASTBufferQueue.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2021-03-12 09:50:36 +0000
committer Siarhei Vishniakou <svv@google.com> 2021-03-12 20:25:07 +0000
commiteedd0fc7b1a1269fc4891ddb110c5197739cc3d0 (patch)
treeb2da1bb55347b43cb87cacc52ca69e7515ecc8dd /libs/gui/BLASTBufferQueue.cpp
parentcc81b2f4c32846ecfacb9c56a61eb9af694f345f (diff)
Use Result<InputPublisher::Finished> instead of callback -- try 2
When the 'Finished' message is received inside InputDispatcher, we are currently providing a callback function that gets executed with the parameters that are matching the InputMessage fields. This does not scale well for the case where there is more than 1 type of InputMessage received from the InputConsumer. We would have to provide 2 callbacks, which is not user-friendly. The calling code inside InputDispatcher is already aware of the InputMessage struct, but InputMessage is intended to be a protocol of communication between input channels, and is not meant to be used elsewhere. To provide the output of 'finished' signal, we introduce a new 'Finished' struct into InputPublisher. InputPublisher will now try to read a message, and will provide a response in that struct. This approach will also now force the caller to check ok(), which will increase correctness. Bug: 167947340 Test: atest inputflinger_tests Test: TBD Revert submission 13838212-revert-13780058-receiveFinishedSignal-UGCLLLUBPW Reason for revert: Relanding with fix Reverted Changes: Idb3a44b4a:Revert "Update the usage of receiveFinishedSignal"... I1e71010f5:Revert "Use Result<InputPublisher::Finished> inste... Change-Id: I9c425bb7249d43648e558214e40fa35aeaa0bb11
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
0 files changed, 0 insertions, 0 deletions