Home
last modified time | relevance | path

Searched refs:random (Results 1 – 25 of 56) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/database/
DNewDatabasePerformanceTests.java114 Random random = new Random(42); in setUp() local
117 int r = random.nextInt(100000); in setUp()
146 Random random = new Random(42); in setUp() local
149 int r = random.nextInt(100000); in setUp()
180 Random random = new Random(42); in setUp() local
186 int r = random.nextInt(100000); in setUp()
219 Random random = new Random(42); in setUp() local
225 int r = random.nextInt(100000); in setUp()
256 Random random = new Random(42); in setUp() local
263 int r = random.nextInt(100000); in setUp()
[all …]
DDatabasePerformanceTests.java205 Random random = new Random(42); in setUp() local
208 int r = random.nextInt(100000); in setUp()
238 Random random = new Random(42); in setUp() local
241 int r = random.nextInt(100000); in setUp()
273 Random random = new Random(42); in setUp() local
279 int r = random.nextInt(100000); in setUp()
313 Random random = new Random(42); in setUp() local
319 int r = random.nextInt(100000); in setUp()
351 Random random = new Random(42); in setUp() local
358 int r = random.nextInt(100000); in setUp()
[all …]
DDatabaseCursorTest.java241 Random random = new Random(System.currentTimeMillis()); in testLargeField() local
244 randomString.append((random.nextInt() & 0xf) % 10); in testLargeField()
322 Random random = new Random(System.currentTimeMillis()); in testManyRowsTxt() local
325 randomString.append((random.nextInt() & 0xf) % 10); in testManyRowsTxt()
355 Random random = new Random(System.currentTimeMillis()); in testManyRowsTxtLong() local
358 randomString.append((random.nextInt() & 0xf) % 10); in testManyRowsTxtLong()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DGlyphCacheActivity.java56 textview.setTextSize(6 + (int) (Math.random() * 5) * 10); in createTextView()
57 textview.setTextColor(0xff << 24 | (int) (Math.random() * 255) << 16 | in createTextView()
58 (int) (Math.random() * 255) << 8 | (int) (Math.random() * 255) << 16); in createTextView()
61 int numChars = 5 + (int) (Math.random() * 10); in createTextView()
71 sb.append(mCharacterSet.charAt((int)(Math.random() * mCharacterSet.length()))); in createString()
DPathDestructionActivity.java60 left = MathUtils.random(getWidth() - MIN_SIZE); in getRandomPath()
61 top = MathUtils.random(getHeight() - MIN_SIZE); in getRandomPath()
62 right = left + MathUtils.random(getWidth() - left); in getRandomPath()
63 bottom = top + MathUtils.random(getHeight() - top); in getRandomPath()
74 int red = MathUtils.random(255); in getRandomColor()
75 int green = MathUtils.random(255); in getRandomColor()
76 int blue = MathUtils.random(255); in getRandomColor()
DViewLayerInvalidationActivity.java129 if (Math.random() < .5) { in randomInvalidator()
/frameworks/volley/tests/src/com/android/volley/utils/
DCacheTestUtils.java19 Random random = new Random(); in makeRandomCacheEntry() local
24 entry.data = new byte[random.nextInt(1024)]; in makeRandomCacheEntry()
26 entry.etag = String.valueOf(random.nextLong()); in makeRandomCacheEntry()
27 entry.serverDate = random.nextLong(); in makeRandomCacheEntry()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DVerifierDeviceIdentityTest.java154 MockRandom random = new MockRandom(); in testVerifierDeviceIdentity_Generate_MinValue() local
155 random.setNextLong(Long.MIN_VALUE); in testVerifierDeviceIdentity_Generate_MinValue()
156 VerifierDeviceIdentity id2 = VerifierDeviceIdentity.generate(random); in testVerifierDeviceIdentity_Generate_MinValue()
165 MockRandom random = new MockRandom(); in testVerifierDeviceIdentity_Generate_Random() local
166 random.setNextLong(TEST_1); in testVerifierDeviceIdentity_Generate_Random()
167 VerifierDeviceIdentity id2 = VerifierDeviceIdentity.generate(random); in testVerifierDeviceIdentity_Generate_Random()
/frameworks/base/core/java/android/util/
DMathUtils.java159 public static int random(int howbig) { in random() method in MathUtils
163 public static int random(int howsmall, int howbig) { in random() method in MathUtils
168 public static float random(float howbig) { in random() method in MathUtils
172 public static float random(float howsmall, float howbig) { in random() method in MathUtils
/frameworks/base/tests/CoreTests/android/core/
DInetAddrTest.java84 Random random = new Random(); in testInetAddr() local
87 int index = random.nextInt(HOSTS.length); in testInetAddr()
DHeapTest.java160 Random random = new Random(); in xxtestSoftRefPartialClean() local
167 int r = random.nextInt(64 * 1024) + 128; in xxtestSoftRefPartialClean()
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DBitwiseStreamsTest.java95 Random random = new Random(); in testFive() local
101 int x = random.nextInt(); in testFive()
139 Random random = new Random(); in testExpandArray() local
145 int x = random.nextInt(); in testExpandArray()
DFileRotatorTest.java338 final Random random = new Random(); in testFuzz() local
340 currentTime += Math.abs(random.nextLong()) % DAY_IN_MILLIS; in testFuzz()
345 if (random.nextBoolean()) { in testFuzz()
/frameworks/base/keystore/java/android/security/
DAndroidKeyPairGenerator.java150 public void initialize(int keysize, SecureRandom random) { in initialize() argument
155 public void initialize(AlgorithmParameterSpec params, SecureRandom random) in initialize() argument
/frameworks/base/services/java/com/android/server/location/
DGpsXtraDownloader.java76 Random random = new Random(); in GpsXtraDownloader() local
77 mNextServerIndex = random.nextInt(count); in GpsXtraDownloader()
/frameworks/base/docs/html/tools/help/
Dmonkey.jd7 <a href="{@docRoot}tools/help/emulator.html">emulator</a> or device and generates pseudo-random
9 events. You can use the Monkey to stress-test applications that you are developing, in a random
16 instance or on a device. It sends a pseudo-random stream of
58 which will launch your application and send 500 pseudo-random events to it:</p>
94 <td>Seed value for pseudo-random number generator. If you re-run the Monkey with the same seed
113 (Motion events consist of a down event somewhere on the screen, a series of pseudo-random
120 (Trackball events consist of one or more random movements, sometimes followed by a click.)</td>
145 <td>Adjust percentage of activity launches. At random intervals, the Monkey will issue a startActi…
Dindex.jd49 <dd>Runs on your emulator or device and generates pseudo-random streams of user events such
51 to stress-test applications that you are developing, in a random yet repeatable manner.</dd>
/frameworks/base/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/
DBandwidthEnforcementTestService.java185 final Random random = new Random(); in buildDnsQuery() local
189 random.nextBytes(id); in buildDnsQuery()
/frameworks/volley/tests/src/com/android/volley/
DRequestQueueTest.java55 Random random = new Random(); in makeRequests() local
60 Request.Priority priority = allPriorities[random.nextInt(allPriorities.length)]; in makeRequests()
/frameworks/base/core/java/android/net/
DSntpClient.java211 buffer[offset++] = (byte)(Math.random() * 255.0); in writeTimeStamp()
/frameworks/native/libs/ui/tests/
DRegion_test.cpp146 if (random() % 2) { in TEST_F()
/frameworks/av/media/libstagefright/codecs/amrwbenc/
DAndroid.mk43 src/random.c \
/frameworks/av/drm/mediadrm/plugins/mock/
DMockDrmCryptoPlugin.cpp79 long r = random(); in openSession()
186 long r = random(); in provideKeyResponse()
/frameworks/base/docs/html/google/play/billing/
Dbilling_best_practices.jd85 <h3 id="nonce">Use secure random nonces</h3>
86 <p>Nonces must not be predictable or reused. Always use a cryptographically secure random number
/frameworks/base/core/tests/coretests/src/android/os/
DPerformanceCollectorTest.java375 Random random = new Random(); in workForRandomPeriod() local
376 int period = minDuration + random.nextInt(maxDuration - minDuration); in workForRandomPeriod()

123