fixing random device id generator starting with the same values

This commit is contained in:
Adam Brown 2022-10-02 17:33:27 +01:00 committed by Adam Brown
parent 19724ea5b3
commit 5153ac08c0

View File

@ -521,8 +521,7 @@ internal class AndroidImageContentReader(private val contentResolver: ContentRes
internal class SmallTalkDeviceNameGenerator : DeviceDisplayNameGenerator {
override fun generate(): String {
val allowedChars = ('A'..'Z') + ('a'..'z') + ('0'..'9')
val randomIdentifier = (1..4).map { allowedChars.random() }.joinToString("")
val randomIdentifier = (('A'..'Z') + ('a'..'z') + ('0'..'9')).shuffled().take(4).joinToString("")
return "SmallTalk Android ($randomIdentifier)"
}
}