Merge "Remove usage of Math.randomLongInternal" am: 71afce9340
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682030 Change-Id: I7a31c729f8debaba8276a4376ef4942dc3365513
This commit is contained in:
@@ -92,6 +92,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -137,6 +138,8 @@ public class AppStandbyControllerTests {
|
||||
/** Mock variable used in {@link MyInjector#isPackageInstalled(String, int, int)} */
|
||||
private static boolean isPackageInstalled = true;
|
||||
|
||||
private static final Random sRandom = new Random();
|
||||
|
||||
private MyInjector mInjector;
|
||||
private AppStandbyController mController;
|
||||
|
||||
@@ -238,7 +241,7 @@ public class AppStandbyControllerTests {
|
||||
|
||||
@Override
|
||||
File getDataSystemDirectory() {
|
||||
return new File(getContext().getFilesDir(), Long.toString(Math.randomLongInternal()));
|
||||
return new File(getContext().getFilesDir(), Long.toString(sRandom.nextLong()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user