Avoid using deprecated readList
. Serialize and deserialize a String instead of a char array.
This commit is contained in:
parent
2d90524763
commit
61a4dd2128
@ -142,7 +142,8 @@ class LockScreenCodeView @JvmOverloads constructor(
|
|||||||
var codeLength: Int = 0
|
var codeLength: Int = 0
|
||||||
|
|
||||||
constructor(source: Parcel) : super(source) {
|
constructor(source: Parcel) : super(source) {
|
||||||
source.readList(code, null)
|
val codeStr = source.readString().orEmpty()
|
||||||
|
code = codeStr.toMutableList()
|
||||||
codeLength = source.readInt()
|
codeLength = source.readInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +151,7 @@ class LockScreenCodeView @JvmOverloads constructor(
|
|||||||
|
|
||||||
override fun writeToParcel(out: Parcel, flags: Int) {
|
override fun writeToParcel(out: Parcel, flags: Int) {
|
||||||
super.writeToParcel(out, flags)
|
super.writeToParcel(out, flags)
|
||||||
out.writeList(code)
|
out.writeString(String(code.toCharArray()))
|
||||||
out.writeInt(codeLength)
|
out.writeInt(codeLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user