From 097ca275f4717a2c47a5d49f302ed2b72c8a1370 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Fri, 14 Nov 2014 08:01:01 -0800 Subject: 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 --- libs/gui/BufferQueueProducer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/gui/BufferQueueProducer.cpp') diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index d2fd3b0255..f9f473444d 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -774,8 +774,8 @@ status_t BufferQueueProducer::connect(const sp& listener, // Set up a death notification so that we can disconnect // automatically if the remote producer dies if (listener != NULL && - listener->asBinder()->remoteBinder() != NULL) { - status = listener->asBinder()->linkToDeath( + IInterface::asBinder(listener)->remoteBinder() != NULL) { + status = IInterface::asBinder(listener)->linkToDeath( static_cast(this)); if (status != NO_ERROR) { BQ_LOGE("connect(P): linkToDeath failed: %s (%d)", @@ -824,7 +824,7 @@ status_t BufferQueueProducer::disconnect(int api) { // Remove our death notification callback if we have one if (mCore->mConnectedProducerListener != NULL) { sp token = - mCore->mConnectedProducerListener->asBinder(); + IInterface::asBinder(mCore->mConnectedProducerListener); // This can fail if we're here because of the death // notification, but we just ignore it token->unlinkToDeath( -- cgit v1.2.3-59-g8ed1b