diff options
| author | 2021-09-13 19:06:12 +0000 | |
|---|---|---|
| committer | 2021-09-13 19:06:12 +0000 | |
| commit | fa64e8b448f83db62cd1298978b286f16fef08fa (patch) | |
| tree | 3ffebf91cf4771a4af3fa6753a5c8625c30d8f9e /libs/binder/Parcel.cpp | |
| parent | eeb7ba4a6aa6ee05777e5877e0be4f3452700576 (diff) | |
| parent | 8b245c803049691f5703bed05946b67135e8dfac (diff) | |
Merge changes If27bffb5,I945e650b am: 21fcad29cd am: bd0fef633f am: bd9607b9f1 am: 8b245c8030
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1824010
Change-Id: I961144c07d69f5fc13dcc957bd687c148834a105
Diffstat (limited to 'libs/binder/Parcel.cpp')
| -rw-r--r-- | libs/binder/Parcel.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 99b6be8d4e..dce6f3bf70 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -205,11 +205,11 @@ status_t Parcel::flattenBinder(const sp<IBinder>& binder) { if (binder) { status_t status = writeInt32(1); // non-null if (status != OK) return status; - RpcAddress address = RpcAddress::zero(); + uint64_t address; // TODO(b/167966510): need to undo this if the Parcel is not sent status = mSession->state()->onBinderLeaving(mSession, binder, &address); if (status != OK) return status; - status = address.writeToParcel(this); + status = writeUint64(address); if (status != OK) return status; } else { status_t status = writeInt32(0); // null @@ -279,15 +279,15 @@ status_t Parcel::unflattenBinder(sp<IBinder>* out) const if (isForRpc()) { LOG_ALWAYS_FATAL_IF(mSession == nullptr, "RpcSession required to read from remote parcel"); - int32_t isNull; - status_t status = readInt32(&isNull); + int32_t isPresent; + status_t status = readInt32(&isPresent); if (status != OK) return status; sp<IBinder> binder; - if (isNull & 1) { - auto addr = RpcAddress::zero(); - if (status_t status = addr.readFromParcel(*this); status != OK) return status; + if (isPresent & 1) { + uint64_t addr; + if (status_t status = readUint64(&addr); status != OK) return status; if (status_t status = mSession->state()->onBinderEntering(mSession, addr, &binder); status != OK) return status; |