libgui: Normalize IDisplayEventConnection methods
This change modifies the IDisplayEventConnection API such that every
synchronous method returns a status_t (to be able to return transport
errors). This required changing getDataChannel to return its channel by
output parameter rather than return type.
Currently no more error messages are checked than before, but this will
both enable calling code to check error messages if it desires and,
more importantly, allow the Bp/Bn code to be semi-automatically
generated using SafeInterface.
Test: libgui_tests + manual testing
Change-Id: I8d5bc5ef0475cee07b638a97079b234f0384c022
diff --git a/services/surfaceflinger/EventThread.h b/services/surfaceflinger/EventThread.h
index 3f1d0bb..c0b5532 100644
--- a/services/surfaceflinger/EventThread.h
+++ b/services/surfaceflinger/EventThread.h
@@ -68,9 +68,9 @@
private:
virtual ~Connection();
virtual void onFirstRef();
- virtual sp<BitTube> getDataChannel() const;
- virtual void setVsyncRate(uint32_t count);
- virtual void requestNextVsync(); // asynchronous
+ status_t getDataChannel(sp<BitTube>* outChannel) const override;
+ status_t setVsyncRate(uint32_t count) override;
+ void requestNextVsync() override; // asynchronous
sp<EventThread> const mEventThread;
sp<BitTube> const mChannel;
};