-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace java.util.Random with kotlin Random object (#4364)
This also improves randomness by avoiding to reinitialize the random number generator repeatedly from a seed based on the current time. Typically, if the number generator is reinitialized repeatedly at non-random times (like multiple times in a row), then generated numbers have a higher chance of repeating. The Kotlin Random object is only initialized once, using the best seed available for the current Android version.
- Loading branch information
Showing
2 changed files
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters