diff options
| author | 2014-11-14 08:01:01 -0800 | |
|---|---|---|
| committer | 2014-11-17 08:47:01 -0800 | |
| commit | 097ca275f4717a2c47a5d49f302ed2b72c8a1370 (patch) | |
| tree | 1c2f6c7b2fc2b71aab6759a0b1d8de22db46e830 /libs/gui/SurfaceComposerClient.cpp | |
| parent | d72ff140e0df44106cd8539396ce686aa8f3306a (diff) | |
Replace IInterface::asBinder() with a static
so we can do NULL checks again, and update calls to IInterface::asBinder()
to use the new static version.
Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
| -rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 6446926ea5..04ee1b976b 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -71,7 +71,7 @@ void ComposerService::connectLocked() { }; mDeathObserver = new DeathObserver(*const_cast<ComposerService*>(this)); - mComposerService->asBinder()->linkToDeath(mDeathObserver); + IInterface::asBinder(mComposerService)->linkToDeath(mDeathObserver); } /*static*/ sp<ISurfaceComposer> ComposerService::getComposerService() { @@ -462,14 +462,14 @@ status_t SurfaceComposerClient::initCheck() const { } sp<IBinder> SurfaceComposerClient::connection() const { - return (mClient != 0) ? mClient->asBinder() : 0; + return IInterface::asBinder(mClient); } status_t SurfaceComposerClient::linkToComposerDeath( const sp<IBinder::DeathRecipient>& recipient, void* cookie, uint32_t flags) { sp<ISurfaceComposer> sm(ComposerService::getComposerService()); - return sm->asBinder()->linkToDeath(recipient, cookie, flags); + return IInterface::asBinder(sm)->linkToDeath(recipient, cookie, flags); } void SurfaceComposerClient::dispose() { |