/frameworks/base/tests/UiBench/src/com/android/test/uibench/ |
H A D | TextUtils.java | 25 * Create word of random assortment of lower/upper case letters 27 private static String randomWord(Random random, int length) { argument 30 // add random letter 31 int base = random.nextInt(2) == 0 ? 'A' : 'a'; 32 result += (char)(random.nextInt(26) + base); 39 Random random = new Random(0); 41 strings[i] = randomWord(random, SIMPLE_STRING_LENGTH); 68 Random random = new Random(0); 75 if (random.nextInt(100) < hitPercentage) { 77 result += CACHE_HIT_STRINGS[random [all...] |
/frameworks/volley/src/test/java/com/android/volley/utils/ |
H A D | CacheTestUtils.java | 12 * Makes a random cache entry. 13 * @param data Data to use, or null to use random data 19 Random random = new Random(); 24 entry.data = new byte[random.nextInt(1024)]; 26 entry.etag = String.valueOf(random.nextLong()); 27 entry.lastModified = random.nextLong();
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | GlyphCacheActivity.java | 56 textview.setTextSize(6 + (int) (Math.random() * 5) * 10); 57 textview.setTextColor(0xff << 24 | (int) (Math.random() * 255) << 16 | 58 (int) (Math.random() * 255) << 8 | (int) (Math.random() * 255) << 16); 61 int numChars = 5 + (int) (Math.random() * 10); 71 sb.append(mCharacterSet.charAt((int)(Math.random() * mCharacterSet.length())));
|
H A D | PathDestructionActivity.java | 60 left = MathUtils.random(getWidth() - MIN_SIZE); 61 top = MathUtils.random(getHeight() - MIN_SIZE); 62 right = left + MathUtils.random(getWidth() - left); 63 bottom = top + MathUtils.random(getHeight() - top); 74 int red = MathUtils.random(255); 75 int green = MathUtils.random(255); 76 int blue = MathUtils.random(255);
|
/frameworks/rs/java/tests/RSTest_CompatLib/src/com/android/rs/test/ |
H A D | UT_alloc_copyPadded.java | 83 Random random = new Random(0x172d8ab9); 84 int width = random.nextInt(512); 89 random.nextBytes(inArray); 114 Random random = new Random(0x172d8ab9); 115 int width = random.nextInt(128); 116 int height = random.nextInt(128); 121 random.nextBytes(inArray); 146 Random random = new Random(0x172d8ab9); 147 int w = random.nextInt(32); 148 int h = random [all...] |
H A D | UT_alloc_copy.java | 58 Random random = new Random(0x172d8ab9); 59 int width = random.nextInt(512); 64 random.nextBytes(inArray); 69 int offset = random.nextInt(arr_len); 97 Random random = new Random(0x172d8ab9); 98 int width = random.nextInt(512); 105 inArray[i] = (short)random.nextInt(); 111 int offset = random.nextInt(arr_len); 139 Random random = new Random(0x172d8ab9); 140 int width = random [all...] |
/frameworks/rs/java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/ |
H A D | UT_alloc_copyPadded.java | 83 Random random = new Random(0x172d8ab9); 84 int width = random.nextInt(512); 89 random.nextBytes(inArray); 114 Random random = new Random(0x172d8ab9); 115 int width = random.nextInt(128); 116 int height = random.nextInt(128); 121 random.nextBytes(inArray); 146 Random random = new Random(0x172d8ab9); 147 int w = random.nextInt(32); 148 int h = random [all...] |
H A D | UT_alloc_copy.java | 58 Random random = new Random(0x172d8ab9); 59 int width = random.nextInt(512); 64 random.nextBytes(inArray); 69 int offset = random.nextInt(arr_len); 97 Random random = new Random(0x172d8ab9); 98 int width = random.nextInt(512); 105 inArray[i] = (short)random.nextInt(); 111 int offset = random.nextInt(arr_len); 139 Random random = new Random(0x172d8ab9); 140 int width = random [all...] |
/frameworks/base/core/tests/coretests/src/android/database/ |
H A D | DatabasePerformanceTests.java | 205 Random random = new Random(42); 208 int r = random.nextInt(100000); 238 Random random = new Random(42); 241 int r = random.nextInt(100000); 273 Random random = new Random(42); 279 int r = random.nextInt(100000); 313 Random random = new Random(42); 319 int r = random.nextInt(100000); 351 Random random = new Random(42); 358 int r = random [all...] |
H A D | NewDatabasePerformanceTests.java | 114 Random random = new Random(42); 117 int r = random.nextInt(100000); 146 Random random = new Random(42); 149 int r = random.nextInt(100000); 180 Random random = new Random(42); 186 int r = random.nextInt(100000); 219 Random random = new Random(42); 225 int r = random.nextInt(100000); 256 Random random = new Random(42); 263 int r = random [all...] |
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
H A D | VerifierDeviceIdentityTest.java | 154 MockRandom random = new MockRandom(); 155 random.setNextLong(Long.MIN_VALUE); 156 VerifierDeviceIdentity id2 = VerifierDeviceIdentity.generate(random); 165 MockRandom random = new MockRandom(); 166 random.setNextLong(TEST_1); 167 VerifierDeviceIdentity id2 = VerifierDeviceIdentity.generate(random);
|
/frameworks/base/core/tests/coretests/src/android/net/ |
H A D | IpPrefixTest.java | 247 Random random = new Random(); 249 if (random.nextBoolean()) { 252 random.nextBytes(b); 253 p = new IpPrefix(b, random.nextInt(33)); 259 random.nextBytes(b); 260 p = new IpPrefix(b, random.nextInt(129));
|
/frameworks/base/keystore/java/android/security/keystore/ |
H A D | AndroidKeyStoreKeyGeneratorSpi.java | 51 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) argument 53 super.engineInit(params, random); 138 protected void engineInit(SecureRandom random) { argument 144 protected void engineInit(int keySize, SecureRandom random) { argument 150 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) argument 165 mRng = random;
|
H A D | AndroidKeyStoreCipherSpiBase.java | 100 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
|
/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/widget/ |
H A D | OpReorderTest.java | 50 static Random random = new Random(System.nanoTime()); field in class:OpReorderTest 180 randOp(nextInt(random, nextInt(random, 4))); 182 Log.d(TAG, "running random test " + i); 250 int s = nextInt(random, updatedItemCount - 1); 251 int len = Math.max(1, nextInt(random, updatedItemCount - s)); 256 int s = updatedItemCount == 0 ? 0 : nextInt(random, updatedItemCount); 257 add(s, nextInt(random, 50)); 261 int from = nextInt(random, updatedItemCount); 264 to = nextInt(random, updatedItemCoun 279 nextInt(Random random, int n) argument [all...] |
H A D | AdapterHelperTest.java | 844 Random random = new Random(System.nanoTime()); 847 Log.d(TAG, "running random test " + i); 848 randomTest(random, Math.max(40, 10 + nextInt(random, i))); 850 throw new Throwable("failure at random test " + i + "\n" + t.getMessage() 856 public void randomTest(Random random, int opCount) { argument 861 final int count = 10;// + nextInt(random,100); 862 final int start = nextInt(random, count - 1); 863 final int layoutCount = Math.max(1, nextInt(random, count - start)); 867 final int op = nextInt(random, 910 nextInt(Random random, int n) argument [all...] |
/frameworks/base/packages/DocumentsUI/perf-tests/src/com/android/documentsui/ |
H A D | StressProvider.java | 235 final Random random = new Random(index); 238 builder.append((char) (random.nextInt(96) + 32)); 245 final Random random = new Random(index); 246 return random.nextInt(1024 * 1024 * 100); // Up to 100 MB. 250 final Random random = new Random(index); 252 return REFERENCE_TIMESTAMP - random.nextLong() % 1000L * 60 * 60 * 24 * 30;
|
/frameworks/base/services/core/java/com/android/server/location/ |
H A D | GpsXtraDownloader.java | 77 Random random = new Random(); 78 mNextServerIndex = random.nextInt(count);
|
/frameworks/base/tests/TransitionTests/src/com/android/transitiontests/ |
H A D | LoginActivityFromResources.java | 75 applyScene(Math.random() < .5 ? mSuccessScene : mIncorrectPasswordScene); 77 applyScene(Math.random() < .5 ? mSuccessScene : mUsernameTakenScene);
|
H A D | LoginActivity.java | 89 applyScene(Math.random() < .5 ? mSuccessScene : mIncorrectPasswordScene); 91 applyScene(Math.random() < .5 ? mSuccessScene : mUsernameTakenScene);
|
/frameworks/compile/mclinker/lib/Support/Unix/ |
H A D | System.inc | 69 /// random - generate a random number. 71 return ::random(); 74 /// srandom - set the initial seed value for future calls to random().
|
/frameworks/base/core/java/android/util/ |
H A D | MathUtils.java | 188 public static int random(int howbig) { method in class:MathUtils 192 public static int random(int howsmall, int howbig) { method in class:MathUtils 197 public static float random(float howbig) { method in class:MathUtils 201 public static float random(float howsmall, float howbig) { method in class:MathUtils
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
H A D | BitwiseStreamsTest.java | 95 Random random = new Random(); 101 int x = random.nextInt(); 139 Random random = new Random(); 145 int x = random.nextInt();
|
/frameworks/base/packages/Keyguard/src/com/android/keyguard/ |
H A D | KeyguardDisplayManager.java | 137 int x = mMarginLeft + (int) (Math.random() * (mUsableWidth - mClock.getWidth())); 138 int y = mMarginTop + (int) (Math.random() * (mUsableHeight - mClock.getHeight()));
|
/frameworks/base/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/ |
H A D | BandwidthEnforcementTestService.java | 185 final Random random = new Random(); 189 random.nextBytes(id);
|