Home
last modified time | relevance | path

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

1234

/frameworks/rs/java/tests/RSTest_CompatLib/src/com/android/rs/test/
DUT_alloc_copyPadded.java83 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_1D() local
84 int width = random.nextInt(512); in testAllocation_Byte3_1D()
89 random.nextBytes(inArray); in testAllocation_Byte3_1D()
114 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_2D() local
115 int width = random.nextInt(128); in testAllocation_Byte3_2D()
116 int height = random.nextInt(128); in testAllocation_Byte3_2D()
121 random.nextBytes(inArray); in testAllocation_Byte3_2D()
146 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_3D() local
147 int w = random.nextInt(32); in testAllocation_Byte3_3D()
148 int h = random.nextInt(32); in testAllocation_Byte3_3D()
[all …]
DUT_alloc_copy.java58 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Byte() local
59 int width = random.nextInt(512); in allocation_copy1DRangeTo_Byte()
64 random.nextBytes(inArray); in allocation_copy1DRangeTo_Byte()
69 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Byte()
97 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Short() local
98 int width = random.nextInt(512); in allocation_copy1DRangeTo_Short()
105 inArray[i] = (short)random.nextInt(); in allocation_copy1DRangeTo_Short()
111 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Short()
139 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Int() local
140 int width = random.nextInt(512); in allocation_copy1DRangeTo_Int()
[all …]
/frameworks/rs/java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/
DUT_alloc_copyPadded.java83 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_1D() local
84 int width = random.nextInt(512); in testAllocation_Byte3_1D()
89 random.nextBytes(inArray); in testAllocation_Byte3_1D()
114 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_2D() local
115 int width = random.nextInt(128); in testAllocation_Byte3_2D()
116 int height = random.nextInt(128); in testAllocation_Byte3_2D()
121 random.nextBytes(inArray); in testAllocation_Byte3_2D()
146 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_3D() local
147 int w = random.nextInt(32); in testAllocation_Byte3_3D()
148 int h = random.nextInt(32); in testAllocation_Byte3_3D()
[all …]
DUT_alloc_copy.java58 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Byte() local
59 int width = random.nextInt(512); in allocation_copy1DRangeTo_Byte()
64 random.nextBytes(inArray); in allocation_copy1DRangeTo_Byte()
69 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Byte()
97 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Short() local
98 int width = random.nextInt(512); in allocation_copy1DRangeTo_Short()
105 inArray[i] = (short)random.nextInt(); in allocation_copy1DRangeTo_Short()
111 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Short()
139 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Int() local
140 int width = random.nextInt(512); in allocation_copy1DRangeTo_Int()
[all …]
/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.java242 Random random = new Random(System.currentTimeMillis()); in testLargeField() local
245 randomString.append((random.nextInt() & 0xf) % 10); in testLargeField()
323 Random random = new Random(System.currentTimeMillis()); in testManyRowsTxt() local
326 randomString.append((random.nextInt() & 0xf) % 10); in testManyRowsTxt()
356 Random random = new Random(System.currentTimeMillis()); in testManyRowsTxtLong() local
359 randomString.append((random.nextInt() & 0xf) % 10); in testManyRowsTxtLong()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/
DTextUtils.java27 private static String randomWord(Random random, int length) { in randomWord() argument
31 int base = random.nextInt(2) == 0 ? 'A' : 'a'; in randomWord()
32 result += (char)(random.nextInt(26) + base); in randomWord()
39 Random random = new Random(0); in buildSimpleStringList() local
41 strings[i] = randomWord(random, SIMPLE_STRING_LENGTH); in buildSimpleStringList()
68 Random random = new Random(0); in buildParagraphListWithHitPercentage() local
75 if (random.nextInt(100) < hitPercentage) { in buildParagraphListWithHitPercentage()
77 result += CACHE_HIT_STRINGS[random.nextInt(CACHE_HIT_STRINGS.length)]; in buildParagraphListWithHitPercentage()
81 length += random.nextInt(PARAGRAPH_MISS_MAX_LENGTH - PARAGRAPH_MISS_MIN_LENGTH); in buildParagraphListWithHitPercentage()
83 result += randomWord(random, length); in buildParagraphListWithHitPercentage()
/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()
/frameworks/volley/src/test/java/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.lastModified = 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/support/v7/recyclerview/jvm-tests/src/android/support/v7/widget/
DAdapterHelperTest.java844 Random random = new Random(System.nanoTime()); in testRandom() local
848 randomTest(random, Math.max(40, 10 + nextInt(random, i))); in testRandom()
856 public void randomTest(Random random, int opCount) { in randomTest() argument
862 final int start = nextInt(random, count - 1); in randomTest()
863 final int layoutCount = Math.max(1, nextInt(random, count - start)); in randomTest()
867 final int op = nextInt(random, 5); in randomTest()
871 int s = nextInt(random, mTestAdapter.mItems.size() - 1); in randomTest()
872 int len = Math.max(1, nextInt(random, mTestAdapter.mItems.size() - s)); in randomTest()
878 nextInt(random, mTestAdapter.mItems.size()); in randomTest()
879 add(s, nextInt(random, 50)); in randomTest()
[all …]
DOpReorderTest.java50 static Random random = new Random(System.nanoTime()); field in OpReorderTest
180 randOp(nextInt(random, nextInt(random, 4))); in testRandom()
250 int s = nextInt(random, updatedItemCount - 1); in randOp()
251 int len = Math.max(1, nextInt(random, updatedItemCount - s)); in randOp()
256 int s = updatedItemCount == 0 ? 0 : nextInt(random, updatedItemCount); in randOp()
257 add(s, nextInt(random, 50)); in randOp()
261 int from = nextInt(random, updatedItemCount); in randOp()
264 to = nextInt(random, updatedItemCount); in randOp()
271 s = nextInt(random, updatedItemCount - 1); in randOp()
272 int len = Math.max(1, nextInt(random, updatedItemCount - s)); in randOp()
[all …]
/frameworks/compile/mclinker/lib/Support/Unix/
DSystem.inc69 /// random - generate a random number.
71 return ::random();
74 /// srandom - set the initial seed value for future calls to random().
/frameworks/compile/mclinker/lib/Support/Windows/
DSystem.inc39 /// random - generate a random number.
44 /// srandom - set the initial seed value for future calls to random().
/frameworks/base/keystore/java/android/security/keystore/
DAndroidKeyStoreKeyGeneratorSpi.java51 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
53 super.engineInit(params, random); in engineInit()
138 protected void engineInit(SecureRandom random) { in engineInit() argument
144 protected void engineInit(int keySize, SecureRandom random) { in engineInit() argument
150 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
165 mRng = random; in engineInit()
DAndroidKeyStoreCipherSpiBase.java100 protected final void engineInit(int opmode, Key key, SecureRandom random) in engineInit() argument
106 init(opmode, key, random); in engineInit()
123 SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
128 init(opmode, key, random); in engineInit()
141 SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
146 init(opmode, key, random); in engineInit()
157 private void init(int opmode, Key key, SecureRandom random) throws InvalidKeyException { in init() argument
174 mRng = random; in init()
/frameworks/base/core/tests/coretests/src/android/net/
DIpPrefixTest.java247 Random random = new Random(); in testHashCode() local
249 if (random.nextBoolean()) { in testHashCode()
252 random.nextBytes(b); in testHashCode()
253 p = new IpPrefix(b, random.nextInt(33)); in testHashCode()
259 random.nextBytes(b); in testHashCode()
260 p = new IpPrefix(b, random.nextInt(129)); in testHashCode()
/frameworks/base/packages/DocumentsUI/perf-tests/src/com/android/documentsui/
DStressProvider.java235 final Random random = new Random(index); in createRandomId() local
238 builder.append((char) (random.nextInt(96) + 32)); in createRandomId()
245 final Random random = new Random(index); in createRandomSize() local
246 return random.nextInt(1024 * 1024 * 100); // Up to 100 MB. in createRandomSize()
250 final Random random = new Random(index); in createRandomTime() local
252 return REFERENCE_TIMESTAMP - random.nextLong() % 1000L * 60 * 60 * 24 * 30; in createRandomTime()
/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/util/
DSortedListTest.java197 Random random = new Random(System.nanoTime()); in testRandom() local
202 switch (random.nextInt(3)) { in testRandom()
211 int index = random.nextInt(mList.size()); in testRandom()
220 int index = random.nextInt(mList.size()); in testRandom()
227 newItem.data = random.nextInt(1000); in testRandom()
238 int index = random.nextInt(mList.size()); in testRandom()
240 Item newItem = new Item(item.id, random.nextInt()); in testRandom()
291 Random random = new Random(System.nanoTime()); in shuffle() local
294 int pos1 = random.nextInt(count); in shuffle()
295 int pos2 = random.nextInt(count); in shuffle()
[all …]
/frameworks/base/core/java/android/util/
DMathUtils.java188 public static int random(int howbig) { in random() method in MathUtils
192 public static int random(int howsmall, int howbig) { in random() method in MathUtils
197 public static float random(float howbig) { in random() method in MathUtils
201 public static float random(float howsmall, float howbig) { in random() method in MathUtils
/frameworks/base/core/tests/utiltests/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()
/frameworks/base/tests/TransitionTests/src/com/android/transitiontests/
DLoginActivityFromResources.java75 applyScene(Math.random() < .5 ? mSuccessScene : mIncorrectPasswordScene); in sendMessage()
77 applyScene(Math.random() < .5 ? mSuccessScene : mUsernameTakenScene); in sendMessage()
/frameworks/base/services/core/java/com/android/server/location/
DGpsXtraDownloader.java77 Random random = new Random(); in GpsXtraDownloader() local
78 mNextServerIndex = random.nextInt(count); in GpsXtraDownloader()

1234