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
parent a1460b307d
commit 215695a3ce
1 changed files with 1 additions and 2 deletions

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)"
}
}