From 06b46062d2f8bc82ca3061a23d197734ae51918b Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Fri, 14 Nov 2014 07:58:25 -0800 Subject: Update calls to IInterface::asBinder() to use the new static version. Change-Id: I89a5988a0ac694ffc04d88cf939e8455bf925d4c --- soundtrigger/ISoundTrigger.cpp | 4 ++-- soundtrigger/ISoundTriggerClient.cpp | 6 +++--- soundtrigger/ISoundTriggerHwService.cpp | 4 ++-- soundtrigger/SoundTrigger.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'soundtrigger') diff --git a/soundtrigger/ISoundTrigger.cpp b/soundtrigger/ISoundTrigger.cpp index 42280d1..eecc1ea 100644 --- a/soundtrigger/ISoundTrigger.cpp +++ b/soundtrigger/ISoundTrigger.cpp @@ -58,7 +58,7 @@ public: } Parcel data, reply; data.writeInterfaceToken(ISoundTrigger::getInterfaceDescriptor()); - data.writeStrongBinder(modelMemory->asBinder()); + data.writeStrongBinder(IInterface::asBinder(modelMemory)); status_t status = remote()->transact(LOAD_SOUND_MODEL, data, &reply); if (status != NO_ERROR || (status = (status_t)reply.readInt32()) != NO_ERROR) { @@ -91,7 +91,7 @@ public: } else { data.writeInt32(dataMemory->size()); } - data.writeStrongBinder(dataMemory->asBinder()); + data.writeStrongBinder(IInterface::asBinder(dataMemory)); status_t status = remote()->transact(START_RECOGNITION, data, &reply); if (status != NO_ERROR) { status = (status_t)reply.readInt32(); diff --git a/soundtrigger/ISoundTriggerClient.cpp b/soundtrigger/ISoundTriggerClient.cpp index b0b4428..e0d3add 100644 --- a/soundtrigger/ISoundTriggerClient.cpp +++ b/soundtrigger/ISoundTriggerClient.cpp @@ -44,7 +44,7 @@ public: { Parcel data, reply; data.writeInterfaceToken(ISoundTriggerClient::getInterfaceDescriptor()); - data.writeStrongBinder(eventMemory->asBinder()); + data.writeStrongBinder(IInterface::asBinder(eventMemory)); remote()->transact(ON_RECOGNITION_EVENT, data, &reply); @@ -54,7 +54,7 @@ public: { Parcel data, reply; data.writeInterfaceToken(ISoundTriggerClient::getInterfaceDescriptor()); - data.writeStrongBinder(eventMemory->asBinder()); + data.writeStrongBinder(IInterface::asBinder(eventMemory)); remote()->transact(ON_SOUNDMODEL_EVENT, data, &reply); @@ -63,7 +63,7 @@ public: { Parcel data, reply; data.writeInterfaceToken(ISoundTriggerClient::getInterfaceDescriptor()); - data.writeStrongBinder(eventMemory->asBinder()); + data.writeStrongBinder(IInterface::asBinder(eventMemory)); remote()->transact(ON_SERVICE_STATE_CHANGE, data, &reply); diff --git a/soundtrigger/ISoundTriggerHwService.cpp b/soundtrigger/ISoundTriggerHwService.cpp index 05728e9..75f68b8 100644 --- a/soundtrigger/ISoundTriggerHwService.cpp +++ b/soundtrigger/ISoundTriggerHwService.cpp @@ -82,7 +82,7 @@ public: Parcel data, reply; data.writeInterfaceToken(ISoundTriggerHwService::getInterfaceDescriptor()); data.write(&handle, sizeof(sound_trigger_module_handle_t)); - data.writeStrongBinder(client->asBinder()); + data.writeStrongBinder(IInterface::asBinder(client)); remote()->transact(ATTACH, data, &reply); status_t status = reply.readInt32(); if (reply.readInt32() != 0) { @@ -147,7 +147,7 @@ status_t BnSoundTriggerHwService::onTransact( reply->writeInt32(status); if (module != 0) { reply->writeInt32(1); - reply->writeStrongBinder(module->asBinder()); + reply->writeStrongBinder(IInterface::asBinder(module)); } else { reply->writeInt32(0); } diff --git a/soundtrigger/SoundTrigger.cpp b/soundtrigger/SoundTrigger.cpp index 0015c30..2138cb7 100644 --- a/soundtrigger/SoundTrigger.cpp +++ b/soundtrigger/SoundTrigger.cpp @@ -104,7 +104,7 @@ sp SoundTrigger::attach(const sound_trigger_module_handle_t module status_t status = service->attach(module, soundTrigger, soundTrigger->mISoundTrigger); if (status == NO_ERROR && soundTrigger->mISoundTrigger != 0) { - soundTrigger->mISoundTrigger->asBinder()->linkToDeath(soundTrigger); + IInterface::asBinder(soundTrigger->mISoundTrigger)->linkToDeath(soundTrigger); } else { ALOGW("Error %d connecting to sound trigger service", status); soundTrigger.clear(); @@ -144,7 +144,7 @@ void SoundTrigger::detach() { mCallback.clear(); if (mISoundTrigger != 0) { mISoundTrigger->detach(); - mISoundTrigger->asBinder()->unlinkToDeath(this); + IInterface::asBinder(mISoundTrigger)->unlinkToDeath(this); mISoundTrigger = 0; } } -- cgit v1.1