/packages/apps/Gallery2/src/com/android/photos/data/ |
H A D | AlbumSetLoader.java | 39 double random = Math.random(); 40 int id = (int) (500 * random); 44 (long) (System.currentTimeMillis() * random), 48 (random < .3 ? 1 : 0),
|
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
H A D | CodePointUtils.java | 72 @Nonnull final Random random) { 75 final int r = Math.abs(random.nextInt()); 94 * Generates a random word. 98 public static String generateWord(@Nonnull final Random random, argument 101 // 8 * 4 = 32 chars max, but we do it the following way so as to bias the random toward 104 final int count = 1 + (Math.abs(random.nextInt()) % 5) 105 + (Math.abs(random.nextInt()) % 5) 106 + (Math.abs(random.nextInt()) % 5) 107 + (Math.abs(random.nextInt()) % 5) 108 + (Math.abs(random 71 generateCodePointSet(final int codePointSetSize, @Nonnull final Random random) argument [all...] |
/packages/apps/TV/src/com/android/tv/recommendation/ |
H A D | RandomEvaluator.java | 22 return Math.random();
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
H A D | LatinImeStressTests.java | 32 final Random random = new Random(seed); 35 changeLanguageWithoutWait(locales[random.nextInt(locales.length)], 37 final int wordCount = random.nextInt(maxWordCountToTypeInEachIteration); 39 final String word = CodePointUtils.generateWord(random, codePointSet); 49 final Random random = new Random(seed); 51 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); 53 changeLanguageWithoutWait(locales[random.nextInt(locales.length)], 55 final int wordCount = random.nextInt(maxWordCountToTypeInEachIteration); 57 final String word = CodePointUtils.generateWord(random, codePointSet);
|
H A D | BinaryDictionaryTests.java | 247 final Random random = new Random(seed); 248 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); 250 final String word = CodePointUtils.generateWord(random, codePointSet); 251 probabilityMap.put(word, random.nextInt(0xFF)); 319 final Random random = new Random(seed); 324 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); 329 final String word = CodePointUtils.generateWord(random, codePointSet); 331 final int unigramProbability = random.nextInt(0xFF); 337 final String word0 = words.get(random.nextInt(wordCount)); 338 final String word1 = words.get(random [all...] |
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/makedict/ |
H A D | FusionDictionaryTest.java | 40 final Random random = new Random(seed); 42 generateWords(MAX_UNIGRAMS, random); 46 * Generates a random word. 48 private String generateWord(final Random random) { argument 50 int count = random.nextInt() % 30; 52 final long r = Math.abs(random.nextInt()); 60 if (builder.length() == 1) return generateWord(random); 64 private void generateWords(final int number, final Random random) { argument 66 sWords.add(generateWord(random));
|
/packages/apps/Email/tests/src/com/android/emailcommon/utility/ |
H A D | SSLUtilsTest.java | 76 Random random = new Random(314159 /* seed */); 79 String s1 = randomString(random); 80 String s2 = randomString(random);
|
/packages/apps/Dialer/java/com/android/dialer/simulator/impl/ |
H A D | RttChatBot.java | 82 private final Random random = new Random(); field in class:RttChatBot.MessageHandler 108 obtainMessage(SEND_MESSAGE, nextTyping()), 1000 * (1 + random.nextInt(10))); 111 sendMessageDelayed(obtainMessage(SEND_MESSAGE, nextTyping()), 200 * random.nextInt(10)); 121 String text = CANDIDATE_MESSAGES[random.nextInt(CANDIDATE_MESSAGES.length)]; 128 int size = random.nextInt(currentTypingMessage.length() - currentTypingPosition + 1);
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/personalization/ |
H A D | UserHistoryDictionaryTestsHelper.java | 45 * Characters for generating random words. 66 * Generates and writes random words to dictionary. Caller can be assured 72 * @param random helps generate random words. 78 final int numberOfWords, final Random random, final boolean checkContents, 80 final List<String> words = generateWords(numberOfWords, random); 81 // Add random words to the user history dictionary. 118 * Generates random words. 121 * @param random salt used for generating random word 77 addAndWriteRandomWords(final UserHistoryDictionary dict, final int numberOfWords, final Random random, final boolean checkContents, final int currentTime) argument 123 generateWords(final int numberOfWords, final Random random) argument [all...] |
H A D | UserHistoryDictionaryTests.java | 120 final Random random = new Random(123456); 122 dict, numberOfWords, random, true /* checksContents */, mCurrentTime)); 151 final Random random = new Random(123456); 174 random, 205 final Random random = new Random(123456); 210 numberOfWords, random, true /* checksContents */, mCurrentTime));
|
/packages/experimental/Bummer/src/com/android/dreams/bummer/ |
H A D | BummerView.java | 52 final float newx = (float) (Math.random() * (framew - textw)); 53 final float newy = (float) (Math.random() * (frameh - texth));
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
H A D | BummerView.java | 52 final float newx = (float) (Math.random() * (framew - textw)); 53 final float newy = (float) (Math.random() * (frameh - texth));
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | SlideshowView.java | 128 public SlideshowAnimation(int width, int height, Random random) { argument 132 MOVE_SPEED * mWidth * (random.nextFloat() - 0.5f), 133 MOVE_SPEED * mHeight * (random.nextFloat() - 0.5f));
|
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/util/ |
H A D | SimpleTempStorage.java | 45 private Random random = new Random(); field in class:SimpleTempStorage 64 long n = Math.abs(random.nextLong()); 93 long n = Math.abs(random.nextLong());
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/debug/ |
H A D | DataExporter.java | 73 /** @return long random string for a file name */ 76 final byte[] random = new byte[256 / 8]; 77 rng.nextBytes(random); 79 return Hex.encodeHex(random, true);
|
/packages/apps/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;
|
/packages/inputmethods/LatinIME/native/jni/tests/dictionary/utils/ |
H A D | bloom_filter_test.cpp | 24 #include <random> 36 // Initialize data set with random integers.
|
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/ |
H A D | RecommendationUtils.java | 87 public void resetRandom(Random random) { argument 88 mRandom = random; 131 // Time hopping with random minutes.
|
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/ |
H A D | SelfManagedConnectionService.java | 88 Random random = new Random(); 89 connection.setCallerDisplayName(TEST_NAMES[random.nextInt(TEST_NAMES.length)],
|
H A D | TestVideoProvider.java | 59 private Random random; field in class:TestVideoProvider 80 random = new Random(); 188 long dataUsageKb = (10 *1024) + random.nextInt(50 * 1024);
|
/packages/experimental/StrictModeTest/src/com/android/strictmodetest/ |
H A D | StrictModeActivity.java | 164 // Now try a random hostname to evade libcore's 167 String random = "" + Math.random(); 168 random = random.substring(random.indexOf(".") + 1); 169 String domain = random + ".livejournal.com"; 171 Log.d(TAG, "for random domain " + domain + ": " + addr);
|
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/ |
H A D | BinaryDictOffdeviceUtilsTests.java | 67 private static void generateWords(final int maxUnigrams, final Random random) { argument 69 CODE_POINT_SET_SIZE, random); 72 wordSet.add(CodePointUtils.generateWord(random, codePointSet)); 136 // Test that a random data file actually fails 149 // Test that a compressed random data file actually fails 164 // Add some random options for test
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
H A D | MoveScreensaverRunnable.java | 33 * This runnable chooses a random initial position for {@link #mSaverView} within 35 * each minute, at which time {@link #mSaverView} is faded out, set to a new random location, and 68 * Start or restart the random movement of the saver view within the content view. 77 // Execute the position updater runnable to choose the first random position of saver view. 85 * Stop the random movement of the saver view within the content view. 118 // Select a new random position anywhere in mContentView that will fit mSaverView. 152 * @return a random integer between 0 and the {@code maximum} exclusive. 155 return (int) (Math.random() * maximum);
|
/packages/apps/Dialer/java/com/android/incallui/spam/ |
H A D | SpamCallListListener.java | 75 private final Random random; field in class:SpamCallListListener 85 this.random = rand; 307 int randomNumber = random.nextInt(100); 330 int randomNumber = random.nextInt(100);
|
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/internet/ |
H A D | MimeMultipart.java | 62 sb.append(Integer.toString((int) (Math.random() * 35), 36));
|