summaryrefslogtreecommitdiff
path: root/libs/binder/PersistableBundle.cpp
diff options
context:
space:
mode:
author Nan Wu <wnan@google.com> 2025-01-27 20:24:48 +0000
committer Nan Wu <wnan@google.com> 2025-01-27 20:24:48 +0000
commite1226b0f04c5a5dbb69fc9aa053a27647758b663 (patch)
tree3263ce1587e25e1a0b5e1c0f53c9b0f388738ab9 /libs/binder/PersistableBundle.cpp
parentca8bfa357cee3c353daf3cc4d2b14b1c226361d7 (diff)
Sync implementation with BaseBundle change
Method readFromParcel and writeToParcel needs to be in sync with BaseBundle. a new field mHasIntent is added to BaseBundle. Bug: 377190225 Test: manual Flag: EXEMPT bug fix Change-Id: I83040c9339469b5d8a08446b7fdc7f791eb52978
Diffstat (limited to 'libs/binder/PersistableBundle.cpp')
-rw-r--r--libs/binder/PersistableBundle.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/binder/PersistableBundle.cpp b/libs/binder/PersistableBundle.cpp
index abb6612a1c..99f9726c5e 100644
--- a/libs/binder/PersistableBundle.cpp
+++ b/libs/binder/PersistableBundle.cpp
@@ -119,6 +119,9 @@ status_t PersistableBundle::writeToParcel(Parcel* parcel) const {
}
RETURN_IF_FAILED(parcel->writeInt32(static_cast<int32_t>(length)));
parcel->setDataPosition(end_pos);
+ // write mHasIntent to be consistent with BaseBundle.writeToBundle. But it would always be
+ // false since PersistableBundle won't contain an intent.
+ RETURN_IF_FAILED(parcel->writeBool(false));
return NO_ERROR;
}
@@ -473,6 +476,8 @@ status_t PersistableBundle::readFromParcelInner(const Parcel* parcel, size_t len
}
}
}
+ // result intentional ignored since it will always be false;
+ RETURN_IF_FAILED(parcel->readBool());
return NO_ERROR;
}