Searched defs:random (Results 1 - 16 of 16) sorted by relevance

/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/
H A DUtils.java29 public static String getRandomWord(Random random, int length) { argument
32 char base = random.nextBoolean() ? 'A' : 'a';
33 char nextChar = (char)(random.nextInt(26) + base);
40 Random random = new Random(0);
43 result[i] = getRandomWord(random, RANDOM_WORD_LENGTH);
71 Random random = new Random(0);
78 if (random.nextInt(100) < hitPercentage) {
80 result.append(CACHE_HIT_STRINGS[random.nextInt(CACHE_HIT_STRINGS.length)]);
82 // construct a random word, which will *most likely* miss
84 length += random
[all...]
/frameworks/base/tests/UiBench/src/com/android/test/uibench/
H A DTextUtils.java38 * Create word of random assortment of lower/upper case letters
40 private static String randomWord(Random random, int length) { argument
43 // add random letter
44 int base = random.nextInt(2) == 0 ? 'A' : 'a';
45 result += (char)(random.nextInt(26) + base);
51 * Create word from a random assortment of a given set of codepoints, given as strings.
53 private static String randomWordFromStringSet(Random random, int length, String[] stringSet) { argument
57 sb.append(stringSet[random.nextInt(setLength)]);
80 Random random = new Random(0);
82 strings[i] = randomWord(random, stringLengt
[all...]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
H A DMatrixTest.java112 * Generates a random permuation matrix
114 public Matrix generatePermutationMatrix(int size, Random random) { argument
120 Collections.shuffle(j, random);
128 * Test that inverting a random permutaion matrix works
184 Random random = new Random();
187 m1.mem[i] = random.nextDouble();
/frameworks/base/apct-tests/perftests/core/src/android/text/
H A DNonEditableTextGenerator.java25 public NonEditableTextGenerator(Random random) { argument
26 mRandom = random;
105 public RandomCharSequenceGenerator(Random random) { argument
106 mRandom = random;
117 // add random word
126 // create a random length that is (mMinWordLength + random amount of chars) where
130 // add random letter
/frameworks/base/core/java/com/android/internal/ml/clustering/
H A DKMeans.java44 public KMeans(Random random) { argument
45 this(random, 30 /* maxIterations */, 0.005f /* convergenceEpsilon */);
47 public KMeans(Random random, int maxIterations, float convergenceEpsilon) { argument
48 mRandomState = random;
/frameworks/base/core/java/org/apache/http/conn/ssl/
H A DSSLSocketFactory.java187 final SecureRandom random,
204 this.sslcontext.init(keymanagers, trustmanagers, random);
182 SSLSocketFactory( String algorithm, final KeyStore keystore, final String keystorePassword, final KeyStore truststore, final SecureRandom random, final HostNameResolver nameResolver) argument
/frameworks/base/keystore/java/android/security/keystore/
H A DAndroidKeyStoreKeyGeneratorSpi.java52 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) argument
54 super.engineInit(params, random);
145 protected void engineInit(SecureRandom random) { argument
151 protected void engineInit(int keySize, SecureRandom random) { argument
157 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) argument
172 mRng = random;
H A DAndroidKeyStoreSignatureSpiBase.java81 protected final void engineInitSign(PrivateKey privateKey, SecureRandom random) argument
98 appRandom = random;
H A DAndroidKeyStoreCipherSpiBase.java100 protected final void engineInit(int opmode, Key key, SecureRandom random) argument
106 init(opmode, key, random);
123 SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
128 init(opmode, key, random);
141 SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
146 init(opmode, key, random);
157 private void init(int opmode, Key key, SecureRandom random) throws InvalidKeyException { argument
174 mRng = random;
869 * random parameters, such as IV.
122 engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) argument
140 engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) argument
H A DAndroidKeyStoreKeyPairGeneratorSpi.java179 public void initialize(int keysize, SecureRandom random) { argument
187 public void initialize(AlgorithmParameterSpec params, SecureRandom random) argument
353 mRng = random;
/frameworks/base/tests/SoundTriggerTests/src/android/hardware/soundtrigger/stubhal/
H A DGenericSoundModelTest.java57 private Random random = new Random(); field in class:GenericSoundModelTest
87 random.nextBytes(data);
220 // Select a random model
224 // Perform a random operation
/frameworks/av/drm/drmserver/
H A DDrmManager.cpp57 int random = rand(); local
60 int temp = (random + index) % kMaxNumUniqueIds;
/frameworks/support/exifinterface/src/androidTest/java/androidx/exifinterface/media/
H A DExifInterfaceTest.java359 // testing. Uses Epoch date count as random seed so that we can reproduce a broken test.
361 Log.d(TAG, "testDoNotFailOnCorruptedImage random seed: " + seed);
362 Random random = new Random(seed);
367 random.nextBytes(bytes);
368 if (!randomlyCorrupted(random)) {
371 if (!randomlyCorrupted(random)) {
374 buffer.putShort((short) (random.nextInt(100) + 300));
375 if (!randomlyCorrupted(random)) {
378 if (!randomlyCorrupted(random)) {
381 if (!randomlyCorrupted(random)) {
840 generateRandomExifTag(ByteBuffer buffer, int ifdType, Random random) argument
860 randomlyCorrupted(Random random) argument
[all...]
/frameworks/support/v7/recyclerview/src/test/java/androidx/recyclerview/widget/
H A DOpReorderTest.java53 static Random random = new Random(System.nanoTime()); field in class:OpReorderTest
183 randOp(nextInt(random, nextInt(random, 4)));
185 Log.d(TAG, "running random test " + i);
253 int s = nextInt(random, updatedItemCount - 1);
254 int len = Math.max(1, nextInt(random, updatedItemCount - s));
259 int s = updatedItemCount == 0 ? 0 : nextInt(random, updatedItemCount);
260 add(s, nextInt(random, 50));
264 int from = nextInt(random, updatedItemCount);
267 to = nextInt(random, updatedItemCoun
282 nextInt(Random random, int n) argument
[all...]
H A DAdapterHelperTest.java850 Random random = new Random(System.nanoTime());
853 log("running random test " + i);
854 randomTest(random, Math.max(40, 10 + nextInt(random, i)));
856 throw new Throwable("failure at random test " + i + "\n" + t.getMessage()
862 private void randomTest(Random random, int opCount) { argument
867 final int count = 10;// + nextInt(random,100);
868 final int start = nextInt(random, count - 1);
869 final int layoutCount = Math.max(1, nextInt(random, count - start));
873 final int op = nextInt(random,
916 nextInt(Random random, int n) argument
[all...]
/frameworks/data-binding/prebuilds/1.0-rc0/
H A Ddatabinding-studio-bundle.jarMETA-INF/ META-INF/MANIFEST.MF android/ android/databinding/ android/databinding/Bindable.class Bindable. ...

Completed in 1440 milliseconds