Skip to content
Commit 31fa5144 authored by Hao Ke's avatar Hao Ke
Browse files

Don't require T to extend Parcelable or Serializable in Parcel

This is because we want to support the use-case where the caller
enforces a specific class type that doesn't implement Parcelable
or Serializable but the child classes written on the payload implement them.

One such use-case that needs this before migrating is
https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/infra/AndroidFuture.java;l=596;drc=2d6a545e3042d7cc91b54746e774681a05e0ff22:
we need to enforce Throwable class but it doesn't implement Parcelable itself,
while its children written on the wire are expected to.

Test: atest -d android.os.cts.ParcelTest
Bug: 195622897
Change-Id: I150416d0cfb0b87ddbaff1041d8d60aa205f6f39
parent 43981a85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment