/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | BinaryDictionaryTests.java | 263 final Random random = new Random(seed); in testRandomlyAddUnigramWord() local 264 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); in testRandomlyAddUnigramWord() 266 final String word = CodePointUtils.generateWord(random, codePointSet); in testRandomlyAddUnigramWord() 267 probabilityMap.put(word, random.nextInt(0xFF)); in testRandomlyAddUnigramWord() 337 final Random random = new Random(seed); in testRandomlyAddBigramWords() local 342 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); in testRandomlyAddBigramWords() 347 final String word = CodePointUtils.generateWord(random, codePointSet); in testRandomlyAddBigramWords() 349 final int unigramProbability = random.nextInt(0xFF); in testRandomlyAddBigramWords() 355 final String word0 = words.get(random.nextInt(wordCount)); in testRandomlyAddBigramWords() 356 final String word1 = words.get(random.nextInt(wordCount)); in testRandomlyAddBigramWords() [all …]
|
D | LatinImeStressTests.java | 32 final Random random = new Random(seed); in testSwitchLanguagesAndInputLatinRandomCodePoints() local 35 changeLanguageWithoutWait(locales[random.nextInt(locales.length)], in testSwitchLanguagesAndInputLatinRandomCodePoints() 37 final int wordCount = random.nextInt(maxWordCountToTypeInEachIteration); in testSwitchLanguagesAndInputLatinRandomCodePoints() 39 final String word = CodePointUtils.generateWord(random, codePointSet); in testSwitchLanguagesAndInputLatinRandomCodePoints() 49 final Random random = new Random(seed); in testSwitchLanguagesAndInputRandomCodePoints() local 51 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); in testSwitchLanguagesAndInputRandomCodePoints() 53 changeLanguageWithoutWait(locales[random.nextInt(locales.length)], in testSwitchLanguagesAndInputRandomCodePoints() 55 final int wordCount = random.nextInt(maxWordCountToTypeInEachIteration); in testSwitchLanguagesAndInputRandomCodePoints() 57 final String word = CodePointUtils.generateWord(random, codePointSet); in testSwitchLanguagesAndInputRandomCodePoints()
|
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
D | CodePointUtils.java | 72 @Nonnull final Random random) { in generateCodePointSet() argument 75 final int r = Math.abs(random.nextInt()); in generateCodePointSet() 98 public static String generateWord(@Nonnull final Random random, in generateWord() argument 104 final int count = 1 + (Math.abs(random.nextInt()) % 5) in generateWord() 105 + (Math.abs(random.nextInt()) % 5) in generateWord() 106 + (Math.abs(random.nextInt()) % 5) in generateWord() 107 + (Math.abs(random.nextInt()) % 5) in generateWord() 108 + (Math.abs(random.nextInt()) % 5) in generateWord() 109 + (Math.abs(random.nextInt()) % 5) in generateWord() 110 + (Math.abs(random.nextInt()) % 5) in generateWord() [all …]
|
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/makedict/ |
D | FusionDictionaryTest.java | 40 final Random random = new Random(seed); in prepare() local 42 generateWords(MAX_UNIGRAMS, random); in prepare() 48 private String generateWord(final Random random) { in generateWord() argument 50 int count = random.nextInt() % 30; in generateWord() 52 final long r = Math.abs(random.nextInt()); in generateWord() 60 if (builder.length() == 1) return generateWord(random); in generateWord() 64 private void generateWords(final int number, final Random random) { in generateWords() argument 66 sWords.add(generateWord(random)); in generateWords()
|
/packages/apps/Gallery2/src/com/android/photos/data/ |
D | AlbumSetLoader.java | 39 double random = Math.random(); in createRandomRow() local 40 int id = (int) (500 * random); in createRandomRow() 44 (long) (System.currentTimeMillis() * random), in createRandomRow() 48 (random < .3 ? 1 : 0), in createRandomRow()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/personalization/ |
D | UserHistoryDictionaryTests.java | 133 final Random random = new Random(123456); in doTestRandomWords() local 135 dict, numberOfWords, random, true /* checksContents */, mCurrentTime)); in doTestRandomWords() 168 final Random random = new Random(123456); in doTestStressTestForSwitchingLanguagesAndAddingWords() local 191 random, in doTestStressTestForSwitchingLanguagesAndAddingWords() 224 final Random random = new Random(123456); in doTestAddManyWords() local 229 numberOfWords, random, true /* checksContents */, mCurrentTime)); in doTestAddManyWords()
|
D | UserHistoryDictionaryTestsHelper.java | 78 final int numberOfWords, final Random random, final boolean checkContents, in addAndWriteRandomWords() argument 80 final List<String> words = generateWords(numberOfWords, random); in addAndWriteRandomWords() 123 public static List<String> generateWords(final int numberOfWords, final Random random) { in generateWords() argument 126 wordSet.add(generateWord(random.nextInt())); in generateWords()
|
/packages/apps/Dialer/java/com/android/dialer/simulator/impl/ |
D | RttChatBot.java | 82 private final Random random = new Random(); field in RttChatBot.MessageHandler 108 obtainMessage(SEND_MESSAGE, nextTyping()), 1000 * (1 + random.nextInt(10))); in handleMessage() 111 sendMessageDelayed(obtainMessage(SEND_MESSAGE, nextTyping()), 200 * random.nextInt(10)); in handleMessage() 121 String text = CANDIDATE_MESSAGES[random.nextInt(CANDIDATE_MESSAGES.length)]; in nextTyping() 128 int size = random.nextInt(currentTypingMessage.length() - currentTypingPosition + 1); in nextTyping()
|
/packages/apps/DocumentsUI/perf-tests/src/com/android/documentsui/ |
D | StressProvider.java | 235 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()
|
/packages/apps/Email/tests/src/com/android/emailcommon/utility/ |
D | SSLUtilsTest.java | 76 Random random = new Random(314159 /* seed */); in testSchemeNamesAreMoreOrLessUnique() local 79 String s1 = randomString(random); in testSchemeNamesAreMoreOrLessUnique() 80 String s2 = randomString(random); in testSchemeNamesAreMoreOrLessUnique()
|
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/util/ |
D | SimpleTempStorage.java | 45 private Random random = new Random(); field in SimpleTempStorage 64 long n = Math.abs(random.nextLong()); in createTempPath() 93 long n = Math.abs(random.nextLong()); in createTempFile()
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | SlideshowView.java | 128 public SlideshowAnimation(int width, int height, Random random) { in SlideshowAnimation() argument 132 MOVE_SPEED * mWidth * (random.nextFloat() - 0.5f), in SlideshowAnimation() 133 MOVE_SPEED * mHeight * (random.nextFloat() - 0.5f)); in SlideshowAnimation()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/debug/ |
D | DataExporter.java | 76 final byte[] random = new byte[256 / 8]; in generateRandomName() 77 rng.nextBytes(random); in generateRandomName() 79 return Hex.encodeHex(random, true); in generateRandomName()
|
/packages/apps/Dialer/java/com/android/incallui/spam/ |
D | SpamCallListListener.java | 74 private final Random random; field in SpamCallListListener 84 this.random = rand; in SpamCallListListener() 309 int randomNumber = random.nextInt(100); in shouldThrottleSpamNotification() 333 int randomNumber = random.nextInt(100); in shouldThrottleNonSpamNotification()
|
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/ |
D | TestVideoProvider.java | 59 private Random random; field in TestVideoProvider 80 random = new Random(); in TestVideoProvider() 188 long dataUsageKb = (10 *1024) + random.nextInt(50 * 1024); in onRequestConnectionDataUsage()
|
D | SelfManagedConnectionService.java | 100 Random random = new Random(); in createSelfManagedConnection() local 101 connection.setCallerDisplayName(TEST_NAMES[random.nextInt(TEST_NAMES.length)], in createSelfManagedConnection()
|
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/ |
D | BinaryDictOffdeviceUtilsTests.java | 67 private static void generateWords(final int maxUnigrams, final Random random) { in generateWords() argument 69 CODE_POINT_SET_SIZE, random); in generateWords() 72 wordSet.add(CodePointUtils.generateWord(random, codePointSet)); in generateWords()
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | BummerView.java | 52 final float newx = (float) (Math.random() * (framew - textw)); 53 final float newy = (float) (Math.random() * (frameh - texth));
|
/packages/apps/Nfc/src/com/android/nfc/beam/ |
D | FireflyRenderer.java | 382 mX = (float) (Math.random() * mDisplayWidth) * 4 - 2 * mDisplayWidth; in reset() 383 mY = (float) (Math.random() * mDisplayHeight) * 4 - 2 * mDisplayHeight; in reset() 384 mZ0 = mZ = (float) (Math.random()) * 2 - 1; in reset()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | BinaryDictDecoderEncoderTests.java | 110 private static void generateWords(final int number, final Random random) { in generateWords() argument 112 random); in generateWords() 115 wordSet.add(CodePointUtils.generateWord(random, codePointSet)); in generateWords() 120 LARGE_CODE_POINT_SET_SIZE, random); in generateWords() 123 wordSet.add(CodePointUtils.generateWord(random, largeCodePointSet)); in generateWords()
|
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/ |
D | RecommendationUtils.java | 87 public void resetRandom(Random random) { in resetRandom() argument 88 mRandom = random; in resetRandom()
|
/packages/services/Car/tests/CarTrustAgentClientApp/src/com/android/car/trust/client/ |
D | PhoneEnrolmentController.java | 105 Random random = new Random(); in generateEscrowToken() local 107 buffer.putLong(0, random.nextLong()); in generateEscrowToken()
|
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/ |
D | LocalPhotoSource.java | 108 Random random = new Random(); in getExponentialIndice() local 112 int row = (int)(-Math.log(random.nextDouble()) * total / 2); in getExponentialIndice()
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/ |
D | SSLSocketFactory.java | 182 final SecureRandom random, in SSLSocketFactory() argument 199 sslcontext.init(keymanagers, trustmanagers, random); in SSLSocketFactory()
|
/packages/apps/Nfc/src/com/android/nfc/handover/ |
D | HandoverDataParser.java | 120 byte[] random = new byte[2]; in createCollisionRecord() 121 new Random().nextBytes(random); in createCollisionRecord() 122 return new NdefRecord(NdefRecord.TNF_WELL_KNOWN, RTD_COLLISION_RESOLUTION, null, random); in createCollisionRecord()
|