mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 20:29:10 +03:00
Avoid using deprecated readList
. Serialize and deserialize a String instead of a char array.
This commit is contained in:
parent
2d90524763
commit
61a4dd2128
1 changed files with 3 additions and 2 deletions
|
@ -142,7 +142,8 @@ class LockScreenCodeView @JvmOverloads constructor(
|
|||
var codeLength: Int = 0
|
||||
|
||||
constructor(source: Parcel) : super(source) {
|
||||
source.readList(code, null)
|
||||
val codeStr = source.readString().orEmpty()
|
||||
code = codeStr.toMutableList()
|
||||
codeLength = source.readInt()
|
||||
}
|
||||
|
||||
|
@ -150,7 +151,7 @@ class LockScreenCodeView @JvmOverloads constructor(
|
|||
|
||||
override fun writeToParcel(out: Parcel, flags: Int) {
|
||||
super.writeToParcel(out, flags)
|
||||
out.writeList(code)
|
||||
out.writeString(String(code.toCharArray()))
|
||||
out.writeInt(codeLength)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue