reactormonk
05/12/2025, 6:31 PM@Parcelize
to generate me the CREATOR
for this class:
interface Ringing {
val token: String
val other: Uuid
}
interface NoCall
@Parcelize
sealed class JCallState: Parcelable {
data class IncomingRing(val caller: Uuid, override val token: String) : Ringing, JCallState() {
override val other: Uuid
get() = caller
}
data class OutgoingRing(val callee: Uuid, override val token: String) : Ringing, JCallState() {
override val other: Uuid
get() = callee
}
data class Connecting(val callee: Uuid) : JCallState()
data class InCall(val other: Uuid, val token: String) : JCallState()
data class Rejected(val other: Uuid) : NoCall, JCallState()
data class HungUp(val x: String = "foo") : NoCall, JCallState()
}
But when trying to use it in aidl via
parcelable JCallState;
It tells me there is no CREATOR
.Chrimaeon
05/12/2025, 6:34 PMreactormonk
05/12/2025, 6:36 PMChrimaeon
05/12/2025, 6:38 PMreactormonk
05/12/2025, 6:39 PMUuid
, which is Serializable
, which is supported according to the documentationChrimaeon
05/12/2025, 6:47 PM