diff options
| author | 2021-06-28 16:42:15 +0000 | |
|---|---|---|
| committer | 2021-06-28 16:42:15 +0000 | |
| commit | 604b00db37d28512e2d4156754deb7a99eac834e (patch) | |
| tree | e8695077000957c735f2f0dcddeec41a17c7f298 | |
| parent | 881da35724d664381e672bfb0d737048751ef785 (diff) | |
| parent | 2614378b0b823d4d71a479671a61d071f549b000 (diff) | |
Merge "Remove usage of Math.randomLongInternal" into sc-dev
| -rw-r--r-- | services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java | 5 |
1 files changed, 4 insertions, 1 deletions
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 4c157c0e0a73..645fa630f0db 100644 --- a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java +++ b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java @@ -114,6 +114,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; @@ -166,6 +167,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; @@ -294,7 +297,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 |