Skip to content

Commit e1226b0

Browse files
author
Nan Wu
committed
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
1 parent ca8bfa3 commit e1226b0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

libs/binder/PersistableBundle.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ status_t PersistableBundle::writeToParcel(Parcel* parcel) const {
119119
}
120120
RETURN_IF_FAILED(parcel->writeInt32(static_cast<int32_t>(length)));
121121
parcel->setDataPosition(end_pos);
122+
// write mHasIntent to be consistent with BaseBundle.writeToBundle. But it would always be
123+
// false since PersistableBundle won't contain an intent.
124+
RETURN_IF_FAILED(parcel->writeBool(false));
122125
return NO_ERROR;
123126
}
124127

@@ -473,6 +476,8 @@ status_t PersistableBundle::readFromParcelInner(const Parcel* parcel, size_t len
473476
}
474477
}
475478
}
479+
// result intentional ignored since it will always be false;
480+
RETURN_IF_FAILED(parcel->readBool());
476481

477482
return NO_ERROR;
478483
}

0 commit comments

Comments
 (0)