ParcelableHolder: assert stability on read
The interface a ParcelableHolder is in determines its stability, and it shouldn't change based on what is sent. Bug: 215458170 Test: aidl_integration_test Change-Id: I40239e14e59b3998ac19d140453eb29a298cdb76
This commit is contained in:
@@ -179,7 +179,11 @@ public final class ParcelableHolder implements Parcelable {
|
||||
* Read ParcelableHolder from a parcel.
|
||||
*/
|
||||
public void readFromParcel(@NonNull Parcel parcel) {
|
||||
this.mStability = parcel.readInt();
|
||||
int wireStability = parcel.readInt();
|
||||
if (this.mStability != wireStability) {
|
||||
throw new IllegalArgumentException("Expected stability " + this.mStability
|
||||
+ " but got " + wireStability);
|
||||
}
|
||||
|
||||
mParcelable = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user