diff options
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r-- | libs/binder/Parcel.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 2e4f450bc1..e4dfa52189 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -202,7 +202,7 @@ status_t Parcel::flattenBinder(const sp<IBinder>& binder) status_t status = writeInt32(1); // non-null if (status != OK) return status; RpcAddress address = RpcAddress::zero(); - status = mConnection->state()->onBinderLeaving(mConnection, binder, &address); + status = mSession->state()->onBinderLeaving(mSession, binder, &address); if (status != OK) return status; status = address.writeToParcel(this); if (status != OK) return status; @@ -273,8 +273,7 @@ status_t Parcel::flattenBinder(const sp<IBinder>& binder) status_t Parcel::unflattenBinder(sp<IBinder>* out) const { if (isForRpc()) { - LOG_ALWAYS_FATAL_IF(mConnection == nullptr, - "RpcConnection required to read from remote parcel"); + LOG_ALWAYS_FATAL_IF(mSession == nullptr, "RpcSession required to read from remote parcel"); int32_t isNull; status_t status = readInt32(&isNull); @@ -286,7 +285,7 @@ status_t Parcel::unflattenBinder(sp<IBinder>* out) const auto addr = RpcAddress::zero(); status_t status = addr.readFromParcel(*this); if (status != OK) return status; - binder = mConnection->state()->onBinderEntering(mConnection, addr); + binder = mSession->state()->onBinderEntering(mSession, addr); } return finishUnflattenBinder(binder, out); @@ -568,20 +567,20 @@ void Parcel::markForBinder(const sp<IBinder>& binder) { LOG_ALWAYS_FATAL_IF(mData != nullptr, "format must be set before data is written"); if (binder && binder->remoteBinder() && binder->remoteBinder()->isRpcBinder()) { - markForRpc(binder->remoteBinder()->getPrivateAccessorForId().rpcConnection()); + markForRpc(binder->remoteBinder()->getPrivateAccessorForId().rpcSession()); } } -void Parcel::markForRpc(const sp<RpcConnection>& connection) { +void Parcel::markForRpc(const sp<RpcSession>& session) { LOG_ALWAYS_FATAL_IF(mData != nullptr && mOwner == nullptr, "format must be set before data is written OR on IPC data"); - LOG_ALWAYS_FATAL_IF(connection == nullptr, "markForRpc requires connection"); - mConnection = connection; + LOG_ALWAYS_FATAL_IF(session == nullptr, "markForRpc requires session"); + mSession = session; } bool Parcel::isForRpc() const { - return mConnection != nullptr; + return mSession != nullptr; } void Parcel::updateWorkSourceRequestHeaderPosition() const { @@ -2499,7 +2498,7 @@ void Parcel::initState() mDataPos = 0; ALOGV("initState Setting data size of %p to %zu", this, mDataSize); ALOGV("initState Setting data pos of %p to %zu", this, mDataPos); - mConnection = nullptr; + mSession = nullptr; mObjects = nullptr; mObjectsSize = 0; mObjectsCapacity = 0; |