Merge "Remove usage of Math.randomLongInternal"
diff --git a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
index 1ced467..9860d51 100644
--- a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
@@ -92,6 +92,7 @@
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 @@
/** 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 @@
@Override
File getDataSystemDirectory() {
- return new File(getContext().getFilesDir(), Long.toString(Math.randomLongInternal()));
+ return new File(getContext().getFilesDir(), Long.toString(sRandom.nextLong()));
}
@Override