Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d98e824 authored by Nikita Iashchenko's avatar Nikita Iashchenko
Browse files

Remove usage of Math.randomLongInternal

As a part of internal libcore API cleanup some of the functions
previously exposed are getting removed from public surface.
Math#randomLongInternal is a wrapper around java.util.Random and has no
specific implications so its usages are get refactored.

Bug: 154796679
Test: m droid
Change-Id: I019000d2b35c256e7c8a251a95bd9384d3503335
parent 319fe85e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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