| /frameworks/base/core/java/android/bluetooth/ |
| BluetoothAdapter.java | 38 import java.util.Random; [all...] |
| /frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/ |
| VideoEditorHelper.java | 24 import java.util.Random; 429 Random randomGenerator = new Random();
|
| /frameworks/base/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
| SmsMessageBodyTest.java | 27 import java.util.Random; 495 Random r = new Random(0x4321); // use the same seed for reproducibility 508 // Test incrementally from 1 to 320 character random messages
|
| /frameworks/base/tests/CoreTests/android/core/ |
| MiscRegressionTest.java | 34 import java.util.Random; 368 Random random = new Random(42); // Seed makes test reproducible local 377 // Totally random content 378 random.nextBytes(input); 380 // Random contents with longer repetitions 383 byte what = (byte)random.nextInt(256); 384 int howMany = random.nextInt(32);
|
| SSLSocketTest.java | 43 import java.util.Random; 386 private Random multithreadedFetchRandom = new Random(); [all...] |
| /libcore/luni/src/main/java/java/io/ |
| File.java | 25 import java.util.Random; 60 * Reusing a Random makes temporary filenames slightly harder to predict. 61 * (Random is thread-safe.) 63 private static final Random tempFileRandom = new Random(); [all...] |
| /libcore/luni/src/main/java/java/lang/ |
| Math.java | 20 import java.util.Random; 38 private static Random random; field in class:Math 937 * Returns a pseudo-random double {@code n}, where {@code n >= 0.0 && n < 1.0}. 938 * This method reuses a single instance of {@link java.util.Random}. 939 * This method is thread-safe because access to the {@code Random} is synchronized, 941 * allocating a {@code Random} for each of their threads. 943 * @return a pseudo-random number. 945 public static synchronized double random() { method in class:Math 946 if (random == null) [all...] |
| /packages/apps/Launcher2/src/com/android/launcher2/ |
| RocketLauncher.java | 52 import java.util.Random; 74 static Random sRNG = new Random();
|
| /external/chromium/testing/gtest/src/ |
| gtest-internal-inl.h | 99 // A valid random seed must be in [1, kMaxRandomSeed]. 122 // Returns a random seed in range [1, kMaxRandomSeed] based on the 137 // Returns the first valid random seed after 'seed'. The behavior is 142 << "Invalid random seed " << seed << " - must be in [1, " 295 void ShuffleRange(internal::Random* random, int begin, int end, 309 const int selected = begin + random->Generate(range_width); 316 inline void Shuffle(internal::Random* random, std::vector<E>* v) { 317 ShuffleRange(random, 0, static_cast<int>(v->size()), v) 767 internal::Random* random() { return &random_; } function in class:testing::internal::UnitTestImpl [all...] |
| /external/llvm/utils/unittest/googletest/include/gtest/internal/ |
| gtest-internal-inl.h | 98 // A valid random seed must be in [1, kMaxRandomSeed]. 121 // Returns a random seed in range [1, kMaxRandomSeed] based on the 136 // Returns the first valid random seed after 'seed'. The behavior is 141 << "Invalid random seed " << seed << " - must be in [1, " 291 void ShuffleRange(internal::Random* random, int begin, int end, 305 const int selected = begin + random->Generate(range_width); 312 inline void Shuffle(internal::Random* random, std::vector<E>* v) { 313 ShuffleRange(random, 0, static_cast<int>(v->size()), v) 832 internal::Random* random() { return &random_; } function in class:testing::internal::UnitTestImpl [all...] |
| /external/protobuf/gtest/src/ |
| gtest-internal-inl.h | 95 // A valid random seed must be in [1, kMaxRandomSeed]. 101 // Returns a random seed in range [1, kMaxRandomSeed] based on the 116 // Returns the first valid random seed after 'seed'. The behavior is 121 << "Invalid random seed " << seed << " - must be in [1, " 242 // Vector is an ordered container that supports random access to the 417 void ShuffleRange(internal::Random* random, int begin, int end) { 429 const int selected = begin + random->Generate(range_width); 435 void Shuffle(internal::Random* random) { 1006 internal::Random* random() { return &random_; } function in class:testing::internal::UnitTestImpl [all...] |
| /frameworks/base/core/tests/coretests/src/android/app/ |
| DownloadManagerBaseTest.java | 52 import java.util.Random; 102 public static class LoggingRng extends Random { 292 * Helper to generate a random blob of bytes. 297 * @return The random data that is generated. 304 * Helper to generate a random blob of bytes using a given RNG. 310 * @return The random data that is generated. 312 protected byte[] generateData(int size, DataType type, Random rng) { 583 * Helper to create a large file of random data on the SD card. 612 // Fill the file with random data 614 final int CHUNK_SIZE = 1000000; // copy random data in 1000000-char chunk [all...] |
| /libcore/luni/src/main/java/java/math/ |
| BigInteger.java | 24 import java.util.Random; 120 * Constructs a random non-negative {@code BigInteger} instance in the range 124 * @param random is the random number generator to be used. 127 public BigInteger(int numBits, Random random) { 138 digits[i] = random.nextInt(); 148 * Constructs a random {@code BigInteger} instance in the range {@code [0, 153 * <p><b>Implementation Note:</b> the {@code Random} argument is ignored. 155 * cryptographically strong pseudo-random numbers [all...] |
| /packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
| Utils.java | 34 import java.util.Random; 317 public static void shuffle(int array[], Random random) { 319 int t = random.nextInt(i);
|
| /external/apache-harmony/math/src/test/java/tests/api/java/math/ |
| BigIntegerTest.java | 21 import java.util.Random; 48 Random rand = new Random(); 81 * @tests java.math.BigInteger#BigInteger(int, java.util.Random) 86 new BigInteger(Integer.MAX_VALUE, (Random)null); 94 assertTrue("Random number is negative", bi.compareTo(zero) >= 0); 95 assertTrue("Random number is too big", 98 "Two random numbers in a row are the same (might not be a bug but it very likely is)", 104 * @tests java.math.BigInteger#BigInteger(int, int, java.util.Random) 109 assertTrue("Random number one is negative", bi.compareTo(zero) >= 0) [all...] |
| /frameworks/base/core/java/android/net/ |
| NetworkStatsHistory.java | 41 import java.util.Random; 482 final Random r = new Random(); 500 long txPackets, long operations, Random r) { 526 public static long randomLong(Random r, long start, long end) {
|
| /cts/tests/tests/database/src/android/database/cts/ |
| AbstractCursorTest.java | 39 import java.util.Random; 619 Random ran = new Random(); 626 // generate random number
|
| CursorWindowTest.java | 37 import java.util.Random; 670 Random generator = new Random(); 676 // generate random number
|
| /development/samples/ApiDemos/src/com/example/android/apis/view/ |
| GameView.java | 34 import java.util.Random; 45 private final Random mRandom; 81 mRandom = new Random();
|
| /external/chromium/testing/gtest/include/gtest/internal/ |
| gtest-internal.h | 739 // A simple Linear Congruential Generator for generating random 742 // code). Unlike rand_r(), it's portable. An LCG isn't very random, 744 class GTEST_API_ Random { 748 explicit Random(UInt32 seed) : state_(seed) {} 752 // Generates a random number from [0, range). Crashes if 'range' is 758 GTEST_DISALLOW_COPY_AND_ASSIGN_(Random); [all...] |
| /frameworks/base/core/tests/coretests/src/android/os/ |
| PerformanceCollectorTest.java | 25 import java.util.Random; 375 Random random = new Random(); local 376 int period = minDuration + random.nextInt(maxDuration - minDuration);
|
| /frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/ |
| DownloadManagerBaseTest.java | 52 import java.util.Random; 107 public static class LoggingRng extends Random { 286 * Helper to generate a random blob of bytes using a given RNG. 292 * @return The random data that is generated. 294 private byte[] generateData(int size, DataType type, Random rng) {
|
| /libcore/luni/src/test/java/tests/api/java/util/ |
| HashMapTest.java | 399 Random rnd = new Random(666); 417 rnd = new Random(666);
|
| /packages/apps/Contacts/tests/src/com/android/contacts/activities/ |
| CallLogActivityTests.java | 51 import java.util.Random; 92 private Random mRnd; 108 mRnd = new Random(); 429 * Insert a certain number of random numbers in the DB. Makes sure 456 * @param duration In seconds of the call. Use RAND_DURATION to pick a random one. 485 * @param duration In seconds of the call. Use RAND_DURATION to pick a random one. 504 * @param duration In seconds of the call. Use RAND_DURATION to pick a random one. 527 * @param duration In seconds of the call. Use RAND_DURATION to pick a random one. 540 * @param duration In seconds of the call. Use RAND_DURATION to pick a random one. 549 * @param duration In seconds of the call. Use RAND_DURATION to pick a random one [all...] |
| /packages/apps/DeskClock/src/com/android/deskclock/ |
| DeskClock.java | 65 import java.util.Random; 119 private Random mRNG; 592 mRNG = new Random();
|