From a5f61dd70ac151c8adbde20d3bc4cd7d27808d21 Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Thu, 30 Mar 2017 16:09:13 -0700 Subject: libgui: Format IDisplayEventConnection Applies the framework default .clang-format and does a bit of tidying up (reflowing comments to 100 characters, reordering includes, etc.). Test: libgui_tests + manual testing Change-Id: I8b3515339a93dbe42ce4421cb561b78ed2fe9104 --- libs/gui/IDisplayEventConnection.cpp | 42 +++++++++++------------------------- 1 file changed, 12 insertions(+), 30 deletions(-) (limited to 'libs/gui/IDisplayEventConnection.cpp') diff --git a/libs/gui/IDisplayEventConnection.cpp b/libs/gui/IDisplayEventConnection.cpp index e5c3c48248..4d2d7e90f7 100644 --- a/libs/gui/IDisplayEventConnection.cpp +++ b/libs/gui/IDisplayEventConnection.cpp @@ -14,38 +14,24 @@ * limitations under the License. */ -#include - -#include -#include - -#include - #include #include +#include + namespace android { -// ---------------------------------------------------------------------------- -enum { - GET_DATA_CHANNEL = IBinder::FIRST_CALL_TRANSACTION, - SET_VSYNC_RATE, - REQUEST_NEXT_VSYNC -}; +enum { GET_DATA_CHANNEL = IBinder::FIRST_CALL_TRANSACTION, SET_VSYNC_RATE, REQUEST_NEXT_VSYNC }; -class BpDisplayEventConnection : public BpInterface -{ +class BpDisplayEventConnection : public BpInterface { public: explicit BpDisplayEventConnection(const sp& impl) - : BpInterface(impl) - { - } + : BpInterface(impl) {} virtual ~BpDisplayEventConnection(); - virtual sp getDataChannel() const - { + virtual sp getDataChannel() const { Parcel data, reply; data.writeInterfaceToken(IDisplayEventConnection::getInterfaceDescriptor()); remote()->transact(GET_DATA_CHANNEL, data, &reply); @@ -66,18 +52,15 @@ public: } }; -// Out-of-line virtual method definition to trigger vtable emission in this -// translation unit (see clang warning -Wweak-vtables) +// Out-of-line virtual method definition to trigger vtable emission in this translation unit (see +// clang warning -Wweak-vtables) BpDisplayEventConnection::~BpDisplayEventConnection() {} IMPLEMENT_META_INTERFACE(DisplayEventConnection, "android.gui.DisplayEventConnection"); -// ---------------------------------------------------------------------------- - -status_t BnDisplayEventConnection::onTransact( - uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) -{ - switch(code) { +status_t BnDisplayEventConnection::onTransact(uint32_t code, const Parcel& data, Parcel* reply, + uint32_t flags) { + switch (code) { case GET_DATA_CHANNEL: { CHECK_INTERFACE(IDisplayEventConnection, data, reply); sp channel(getDataChannel()); @@ -98,5 +81,4 @@ status_t BnDisplayEventConnection::onTransact( return BBinder::onTransact(code, data, reply, flags); } -// ---------------------------------------------------------------------------- -}; // namespace android +} // namespace android -- cgit v1.2.3-59-g8ed1b