diff options
Diffstat (limited to 'libs/gui')
-rw-r--r-- | libs/gui/BufferQueueProducer.cpp | 6 | ||||
-rw-r--r-- | libs/gui/IGraphicBufferConsumer.cpp | 2 | ||||
-rw-r--r-- | libs/gui/IGraphicBufferProducer.cpp | 2 | ||||
-rw-r--r-- | libs/gui/ISensorServer.cpp | 2 | ||||
-rw-r--r-- | libs/gui/ISurfaceComposer.cpp | 10 | ||||
-rw-r--r-- | libs/gui/ISurfaceComposerClient.cpp | 2 | ||||
-rw-r--r-- | libs/gui/LayerState.cpp | 4 | ||||
-rw-r--r-- | libs/gui/SensorManager.cpp | 2 | ||||
-rw-r--r-- | libs/gui/StreamSplitter.cpp | 2 | ||||
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 6 | ||||
-rw-r--r-- | libs/gui/SurfaceControl.cpp | 2 | ||||
-rw-r--r-- | libs/gui/tests/BufferQueue_test.cpp | 4 |
12 files changed, 22 insertions, 22 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index 16b9747..bf9c84d 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -807,8 +807,8 @@ status_t BufferQueueProducer::connect(const sp<IProducerListener>& 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<IBinder::DeathRecipient*>(this)); if (status != NO_ERROR) { BQ_LOGE("connect(P): linkToDeath failed: %s (%d)", @@ -857,7 +857,7 @@ status_t BufferQueueProducer::disconnect(int api) { // Remove our death notification callback if we have one if (mCore->mConnectedProducerListener != NULL) { sp<IBinder> 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( diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp index f6d087d..cc581a3 100644 --- a/libs/gui/IGraphicBufferConsumer.cpp +++ b/libs/gui/IGraphicBufferConsumer.cpp @@ -273,7 +273,7 @@ public: virtual status_t consumerConnect(const sp<IConsumerListener>& consumer, bool controlledByApp) { Parcel data, reply; data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor()); - data.writeStrongBinder(consumer->asBinder()); + data.writeStrongBinder(IInterface::asBinder(consumer)); data.writeInt32(controlledByApp); status_t result = remote()->transact(CONSUMER_CONNECT, data, &reply); if (result != NO_ERROR) { diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp index 1e28f9b..bcdf368 100644 --- a/libs/gui/IGraphicBufferProducer.cpp +++ b/libs/gui/IGraphicBufferProducer.cpp @@ -211,7 +211,7 @@ public: data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor()); if (listener != NULL) { data.writeInt32(1); - data.writeStrongBinder(listener->asBinder()); + data.writeStrongBinder(IInterface::asBinder(listener)); } else { data.writeInt32(0); } diff --git a/libs/gui/ISensorServer.cpp b/libs/gui/ISensorServer.cpp index 0b76f37..a8464a2 100644 --- a/libs/gui/ISensorServer.cpp +++ b/libs/gui/ISensorServer.cpp @@ -91,7 +91,7 @@ status_t BnSensorServer::onTransact( case CREATE_SENSOR_EVENT_CONNECTION: { CHECK_INTERFACE(ISensorServer, data, reply); sp<ISensorEventConnection> connection(createSensorEventConnection()); - reply->writeStrongBinder(connection->asBinder()); + reply->writeStrongBinder(IInterface::asBinder(connection)); return NO_ERROR; } break; } diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index ebb687a..bc4baa3 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -113,7 +113,7 @@ public: Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); data.writeStrongBinder(display); - data.writeStrongBinder(producer->asBinder()); + data.writeStrongBinder(IInterface::asBinder(producer)); data.write(sourceCrop); data.writeInt32(reqWidth); data.writeInt32(reqHeight); @@ -137,7 +137,7 @@ public: "interface descriptor: %s (%d)", strerror(-err), -err); return false; } - err = data.writeStrongBinder(bufferProducer->asBinder()); + err = data.writeStrongBinder(IInterface::asBinder(bufferProducer)); if (err != NO_ERROR) { ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing " "strong binder to parcel: %s (%d)", strerror(-err), -err); @@ -299,13 +299,13 @@ status_t BnSurfaceComposer::onTransact( switch(code) { case CREATE_CONNECTION: { CHECK_INTERFACE(ISurfaceComposer, data, reply); - sp<IBinder> b = createConnection()->asBinder(); + sp<IBinder> b = IInterface::asBinder(createConnection()); reply->writeStrongBinder(b); return NO_ERROR; } case CREATE_GRAPHIC_BUFFER_ALLOC: { CHECK_INTERFACE(ISurfaceComposer, data, reply); - sp<IBinder> b = createGraphicBufferAlloc()->asBinder(); + sp<IBinder> b = IInterface::asBinder(createGraphicBufferAlloc()); reply->writeStrongBinder(b); return NO_ERROR; } @@ -378,7 +378,7 @@ status_t BnSurfaceComposer::onTransact( case CREATE_DISPLAY_EVENT_CONNECTION: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IDisplayEventConnection> connection(createDisplayEventConnection()); - reply->writeStrongBinder(connection->asBinder()); + reply->writeStrongBinder(IInterface::asBinder(connection)); return NO_ERROR; } case CREATE_DISPLAY: { diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp index f199e9f..de4d8c1 100644 --- a/libs/gui/ISurfaceComposerClient.cpp +++ b/libs/gui/ISurfaceComposerClient.cpp @@ -114,7 +114,7 @@ status_t BnSurfaceComposerClient::onTransact( status_t result = createSurface(name, w, h, format, flags, &handle, &gbp); reply->writeStrongBinder(handle); - reply->writeStrongBinder(gbp != NULL ? gbp->asBinder() : NULL); + reply->writeStrongBinder(IInterface::asBinder(gbp)); reply->writeInt32(result); return NO_ERROR; } break; diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 39f8f92..ccf8b78 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -67,7 +67,7 @@ status_t layer_state_t::read(const Parcel& input) } status_t ComposerState::write(Parcel& output) const { - output.writeStrongBinder(client->asBinder()); + output.writeStrongBinder(IInterface::asBinder(client)); return state.write(output); } @@ -79,7 +79,7 @@ status_t ComposerState::read(const Parcel& input) { status_t DisplayState::write(Parcel& output) const { output.writeStrongBinder(token); - output.writeStrongBinder(surface != NULL ? surface->asBinder() : NULL); + output.writeStrongBinder(IInterface::asBinder(surface)); output.writeInt32(what); output.writeInt32(layerStack); output.writeInt32(orientation); diff --git a/libs/gui/SensorManager.cpp b/libs/gui/SensorManager.cpp index 7b4fa2f..17960ff 100644 --- a/libs/gui/SensorManager.cpp +++ b/libs/gui/SensorManager.cpp @@ -86,7 +86,7 @@ status_t SensorManager::assertStateLocked() const { }; mDeathObserver = new DeathObserver(*const_cast<SensorManager *>(this)); - mSensorServer->asBinder()->linkToDeath(mDeathObserver); + IInterface::asBinder(mSensorServer)->linkToDeath(mDeathObserver); mSensors = mSensorServer->getSensorList(); size_t count = mSensors.size(); diff --git a/libs/gui/StreamSplitter.cpp b/libs/gui/StreamSplitter.cpp index 5f39905..25e6cab 100644 --- a/libs/gui/StreamSplitter.cpp +++ b/libs/gui/StreamSplitter.cpp @@ -80,7 +80,7 @@ status_t StreamSplitter::addOutput( IGraphicBufferProducer::QueueBufferOutput queueBufferOutput; sp<OutputListener> listener(new OutputListener(this, outputQueue)); - outputQueue->asBinder()->linkToDeath(listener); + IInterface::asBinder(outputQueue)->linkToDeath(listener); status_t status = outputQueue->connect(listener, NATIVE_WINDOW_API_CPU, /* producerControlledByApp */ false, &queueBufferOutput); if (status != NO_ERROR) { diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 547dc7d..1be7895 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() { diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp index 7597c99..61011b9 100644 --- a/libs/gui/SurfaceControl.cpp +++ b/libs/gui/SurfaceControl.cpp @@ -176,7 +176,7 @@ status_t SurfaceControl::writeSurfaceToParcel( if (control != NULL) { bp = control->mGraphicBufferProducer; } - return parcel->writeStrongBinder(bp->asBinder()); + return parcel->writeStrongBinder(IInterface::asBinder(bp)); } sp<Surface> SurfaceControl::getSurface() const diff --git a/libs/gui/tests/BufferQueue_test.cpp b/libs/gui/tests/BufferQueue_test.cpp index 96de11f..838ad90 100644 --- a/libs/gui/tests/BufferQueue_test.cpp +++ b/libs/gui/tests/BufferQueue_test.cpp @@ -87,8 +87,8 @@ TEST_F(BufferQueueTest, BufferQueueInAnotherProcess) { sp<IGraphicBufferConsumer> consumer; BufferQueue::createBufferQueue(&producer, &consumer); sp<IServiceManager> serviceManager = defaultServiceManager(); - serviceManager->addService(PRODUCER_NAME, producer->asBinder()); - serviceManager->addService(CONSUMER_NAME, consumer->asBinder()); + serviceManager->addService(PRODUCER_NAME, IInterface::asBinder(producer)); + serviceManager->addService(CONSUMER_NAME, IInterface::asBinder(consumer)); ProcessState::self()->startThreadPool(); IPCThreadState::self()->joinThreadPool(); LOG_ALWAYS_FATAL("Shouldn't be here"); |