Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e51f0b73 authored by Luca Stefani's avatar Luca Stefani
Browse files

Twelve: Parcelize Provider

Its parent ProviderIdentifier implements Parcelable, thus if
any client were to parcel/unparcel a Provider it would instead
wrongly get the parent CREATOR.

Fixes a lint error.

Change-Id: I5e556d0d197f9027710ff7c8a3aab7a8a6763f0d
parent 1d3e3124
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

package org.lineageos.twelve.models

import kotlinx.parcelize.Parcelize
import org.lineageos.twelve.datasources.MediaDataSource

/**
@@ -17,9 +18,10 @@ import org.lineageos.twelve.datasources.MediaDataSource
 * @param name The name of the provider given by the user
 * @param visible Whether the user should be aware of it
 */
@Parcelize
class Provider(
    type: ProviderType,
    typeId: Long,
    override val type: ProviderType,
    override val typeId: Long,
    val name: String,
    val visible: Boolean,
) : ProviderIdentifier(type, typeId), UniqueItem<Provider> {
+2 −2
Original line number Diff line number Diff line
@@ -19,8 +19,8 @@ import kotlinx.serialization.Serializable
@Serializable
@Suppress("PROVIDED_RUNTIME_TOO_LOW")
open class ProviderIdentifier(
    val type: ProviderType,
    val typeId: Long,
    open val type: ProviderType,
    open val typeId: Long,
) : Comparable<ProviderIdentifier>, Parcelable {
    override fun compareTo(other: ProviderIdentifier) = compareValuesBy(
        this, other,