Loading libs/binder/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,7 @@ cc_library { "-Werror", "-Wzero-as-null-pointer-constant", "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], product_variables: { binder32bit: { Loading libs/binder/AppOpsManager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ static const sp<IBinder>& getClientId() { pthread_mutex_lock(&gClientIdMutex); if (gClientId == nullptr) { gClientId = new BBinder(); gClientId = sp<BBinder>::make(); } pthread_mutex_unlock(&gClientIdMutex); return gClientId; Loading libs/binder/BpBinder.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -107,8 +107,7 @@ void BpBinder::ObjectManager::kill() // --------------------------------------------------------------------------- BpBinder* BpBinder::create(int32_t handle) { sp<BpBinder> BpBinder::create(int32_t handle) { int32_t trackedUid = -1; if (sCountByUidEnabled) { trackedUid = IPCThreadState::self()->getCallingUid(); Loading @@ -134,10 +133,10 @@ BpBinder* BpBinder::create(int32_t handle) { } sTrackingMap[trackedUid]++; } return new BpBinder(BinderHandle{handle}, trackedUid); return sp<BpBinder>::make(BinderHandle{handle}, trackedUid); } BpBinder* BpBinder::create(const sp<RpcConnection>& connection, const RpcAddress& address) { sp<BpBinder> BpBinder::create(const sp<RpcConnection>& connection, const RpcAddress& address) { LOG_ALWAYS_FATAL_IF(connection == nullptr, "BpBinder::create null connection"); // These are not currently tracked, since there is no UID or other Loading @@ -145,7 +144,7 @@ BpBinder* BpBinder::create(const sp<RpcConnection>& connection, const RpcAddress // needed, connection objects keep track of all BpBinder objects on a // per-connection basis. return new BpBinder(SocketHandle{connection, address}); return sp<BpBinder>::make(SocketHandle{connection, address}); } BpBinder::BpBinder(Handle&& handle) Loading Loading @@ -194,7 +193,7 @@ bool BpBinder::isDescriptorCached() const { const String16& BpBinder::getInterfaceDescriptor() const { if (isDescriptorCached() == false) { sp<BpBinder> thiz = const_cast<BpBinder*>(this); sp<BpBinder> thiz = sp<BpBinder>::fromExisting(const_cast<BpBinder*>(this)); Parcel data; data.markForBinder(thiz); Loading Loading @@ -226,7 +225,7 @@ bool BpBinder::isBinderAlive() const status_t BpBinder::pingBinder() { Parcel data; data.markForBinder(this); data.markForBinder(sp<BpBinder>::fromExisting(this)); Parcel reply; return transact(PING_TRANSACTION, data, &reply); } Loading Loading @@ -403,7 +402,7 @@ void BpBinder::reportOneDeath(const Obituary& obit) ALOGV("Reporting death to recipient: %p\n", recipient.get()); if (recipient == nullptr) return; recipient->binderDied(this); recipient->binderDied(wp<BpBinder>::fromExisting(this)); } Loading libs/binder/BufferedTextOutput.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ BufferedTextOutput::BufferState* BufferedTextOutput::getBuffer() const BufferState* bs = ts.states[mIndex].get(); if (bs != nullptr && bs->seq == mSeq) return bs; ts.states.editItemAt(mIndex) = new BufferState(mIndex); ts.states.editItemAt(mIndex) = sp<BufferState>::make(mIndex); bs = ts.states[mIndex].get(); if (bs != nullptr) return bs; } Loading libs/binder/IInterface.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -33,14 +33,14 @@ IInterface::~IInterface() { sp<IBinder> IInterface::asBinder(const IInterface* iface) { if (iface == nullptr) return nullptr; return const_cast<IInterface*>(iface)->onAsBinder(); return sp<IBinder>::fromExisting(const_cast<IInterface*>(iface)->onAsBinder()); } // static sp<IBinder> IInterface::asBinder(const sp<IInterface>& iface) { if (iface == nullptr) return nullptr; return iface->onAsBinder(); return sp<IBinder>::fromExisting(iface->onAsBinder()); } Loading Loading
libs/binder/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,7 @@ cc_library { "-Werror", "-Wzero-as-null-pointer-constant", "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], product_variables: { binder32bit: { Loading
libs/binder/AppOpsManager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ static const sp<IBinder>& getClientId() { pthread_mutex_lock(&gClientIdMutex); if (gClientId == nullptr) { gClientId = new BBinder(); gClientId = sp<BBinder>::make(); } pthread_mutex_unlock(&gClientIdMutex); return gClientId; Loading
libs/binder/BpBinder.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -107,8 +107,7 @@ void BpBinder::ObjectManager::kill() // --------------------------------------------------------------------------- BpBinder* BpBinder::create(int32_t handle) { sp<BpBinder> BpBinder::create(int32_t handle) { int32_t trackedUid = -1; if (sCountByUidEnabled) { trackedUid = IPCThreadState::self()->getCallingUid(); Loading @@ -134,10 +133,10 @@ BpBinder* BpBinder::create(int32_t handle) { } sTrackingMap[trackedUid]++; } return new BpBinder(BinderHandle{handle}, trackedUid); return sp<BpBinder>::make(BinderHandle{handle}, trackedUid); } BpBinder* BpBinder::create(const sp<RpcConnection>& connection, const RpcAddress& address) { sp<BpBinder> BpBinder::create(const sp<RpcConnection>& connection, const RpcAddress& address) { LOG_ALWAYS_FATAL_IF(connection == nullptr, "BpBinder::create null connection"); // These are not currently tracked, since there is no UID or other Loading @@ -145,7 +144,7 @@ BpBinder* BpBinder::create(const sp<RpcConnection>& connection, const RpcAddress // needed, connection objects keep track of all BpBinder objects on a // per-connection basis. return new BpBinder(SocketHandle{connection, address}); return sp<BpBinder>::make(SocketHandle{connection, address}); } BpBinder::BpBinder(Handle&& handle) Loading Loading @@ -194,7 +193,7 @@ bool BpBinder::isDescriptorCached() const { const String16& BpBinder::getInterfaceDescriptor() const { if (isDescriptorCached() == false) { sp<BpBinder> thiz = const_cast<BpBinder*>(this); sp<BpBinder> thiz = sp<BpBinder>::fromExisting(const_cast<BpBinder*>(this)); Parcel data; data.markForBinder(thiz); Loading Loading @@ -226,7 +225,7 @@ bool BpBinder::isBinderAlive() const status_t BpBinder::pingBinder() { Parcel data; data.markForBinder(this); data.markForBinder(sp<BpBinder>::fromExisting(this)); Parcel reply; return transact(PING_TRANSACTION, data, &reply); } Loading Loading @@ -403,7 +402,7 @@ void BpBinder::reportOneDeath(const Obituary& obit) ALOGV("Reporting death to recipient: %p\n", recipient.get()); if (recipient == nullptr) return; recipient->binderDied(this); recipient->binderDied(wp<BpBinder>::fromExisting(this)); } Loading
libs/binder/BufferedTextOutput.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ BufferedTextOutput::BufferState* BufferedTextOutput::getBuffer() const BufferState* bs = ts.states[mIndex].get(); if (bs != nullptr && bs->seq == mSeq) return bs; ts.states.editItemAt(mIndex) = new BufferState(mIndex); ts.states.editItemAt(mIndex) = sp<BufferState>::make(mIndex); bs = ts.states[mIndex].get(); if (bs != nullptr) return bs; } Loading
libs/binder/IInterface.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -33,14 +33,14 @@ IInterface::~IInterface() { sp<IBinder> IInterface::asBinder(const IInterface* iface) { if (iface == nullptr) return nullptr; return const_cast<IInterface*>(iface)->onAsBinder(); return sp<IBinder>::fromExisting(const_cast<IInterface*>(iface)->onAsBinder()); } // static sp<IBinder> IInterface::asBinder(const sp<IInterface>& iface) { if (iface == nullptr) return nullptr; return iface->onAsBinder(); return sp<IBinder>::fromExisting(iface->onAsBinder()); } Loading