Do not preload ThreadLocalRandom class.

ThreadLocalRandom.seeder field uses time in its initialization.
Preloading the class fixes initial state of ThreadLocalRandom,
which leads to the same sequence of generated numbers across
different app runs.

Bug: 234816154
Test: verified manually that TLR.current().nextInt does not return
the same sequence of numbers.

Change-Id: I80868217e02862e8d0a568ea096e22e919ec06e3
Merged-In: I80868217e02862e8d0a568ea096e22e919ec06e3
This commit is contained in:
Almaz Mingaleev
2022-06-09 11:54:28 +01:00
parent 089c119f4d
commit 2a1c933d3e
2 changed files with 1 additions and 2 deletions

View File

@@ -12999,8 +12999,6 @@ java.util.concurrent.SynchronousQueue$TransferStack
java.util.concurrent.SynchronousQueue$Transferer
java.util.concurrent.SynchronousQueue
java.util.concurrent.ThreadFactory
java.util.concurrent.ThreadLocalRandom$1
java.util.concurrent.ThreadLocalRandom
java.util.concurrent.ThreadPoolExecutor$AbortPolicy
java.util.concurrent.ThreadPoolExecutor$DiscardPolicy
java.util.concurrent.ThreadPoolExecutor$Worker

View File

@@ -8,3 +8,4 @@ gov.nist.core.net.DefaultNetworkLayer
android.net.rtp.AudioGroup
android.net.rtp.AudioStream
android.net.rtp.RtpStream
java.util.concurrent.ThreadLocalRandom