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
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.
*