commit | 10bae11c00619785795bc645991313a31a31238b | [log] [tgz] |
---|---|---|
author | Paul Ramirez <peramirez@google.com> | Tue Jun 18 21:33:33 2024 +0000 |
committer | Android Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Mon Nov 25 21:45:29 2024 +0000 |
tree | ac2ad5e1e8000d9e499ecf5ad9c880e3d96826ec | |
parent | a22273415139187a09a41f5f9525aac6be09c5ff [diff] [blame] |
Return message wrapped in Result from receiveMessage Changed receivedMessaged return type from status_t to android::base::Result<>. Enforces checking valid state before using the object. Flag: EXEMPT refactor Bug: 297226446 Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0c25e864701a6c408b90709493dd30de9b929e2e) Merged-In: Ic2285d38a2d0d2227c1fae92379270a5f52586c7 Change-Id: Ic2285d38a2d0d2227c1fae92379270a5f52586c7
diff --git a/include/input/InputTransport.h b/include/input/InputTransport.h index 6548810..b26a194 100644 --- a/include/input/InputTransport.h +++ b/include/input/InputTransport.h
@@ -275,7 +275,7 @@ * Return DEAD_OBJECT if the channel's peer has been closed. * Other errors probably indicate that the channel is broken. */ - status_t receiveMessage(InputMessage* msg); + android::base::Result<InputMessage> receiveMessage(); /* Tells whether there is a message in the channel available to be received. *