summaryrefslogtreecommitdiff
path: root/libs/binder/ParcelableHolder.cpp
diff options
context:
space:
mode:
author Jeongik Cha <jeongik@google.com> 2020-10-20 11:07:38 +0900
committer Jeongik Cha <jeongik@google.com> 2020-10-21 09:52:18 +0000
commit0b8f647e2f5e54d3883dde48d1ccc6fde613e4ff (patch)
tree98ee7f5193452e8a4241a7c65bd0697c63e54835 /libs/binder/ParcelableHolder.cpp
parent1b7f76282f6630acb246ea426275256c219ec911 (diff)
Remove the lock in ParcelableHolder
As we removed the lock for ParcelableHolder in Java(aosp/1458065), the lock both in NDK and c++ side will be removed as well. Instead the lock is provided as default, the users should use their own lock if necessary. Bug: 146611855 Test: CtsNdkBinderTest Change-Id: I334796ecd49d30b53e05da5fcef7d2cfe65164b9
Diffstat (limited to 'libs/binder/ParcelableHolder.cpp')
-rw-r--r--libs/binder/ParcelableHolder.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/libs/binder/ParcelableHolder.cpp b/libs/binder/ParcelableHolder.cpp
index e9df27976c..b2b86716d5 100644
--- a/libs/binder/ParcelableHolder.cpp
+++ b/libs/binder/ParcelableHolder.cpp
@@ -27,7 +27,6 @@
namespace android {
namespace os {
status_t ParcelableHolder::writeToParcel(Parcel* p) const {
- std::lock_guard<std::mutex> l(mMutex);
RETURN_ON_FAILURE(p->writeInt32(static_cast<int32_t>(this->getStability())));
if (this->mParcelPtr) {
RETURN_ON_FAILURE(p->writeInt32(this->mParcelPtr->dataSize()));
@@ -53,7 +52,6 @@ status_t ParcelableHolder::writeToParcel(Parcel* p) const {
}
status_t ParcelableHolder::readFromParcel(const Parcel* p) {
- std::lock_guard<std::mutex> l(mMutex);
this->mStability = static_cast<Stability>(p->readInt32());
this->mParcelable = nullptr;
this->mParcelableName = std::nullopt;