Skip to content

Commit 1e2515d

Browse files
Treehugger RobotAndroid (Google) Code Review
authored andcommitted
Merge "Sync implementation with BaseBundle change" into main
2 parents ce04bbf + e1226b0 commit 1e2515d

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)