Home
last modified time | relevance | path

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

12

/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/
DCodePointUtils.java72 @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/tests/src/com/android/inputmethod/latin/
DBinaryDictionaryTests.java247 final Random random = new Random(seed); in testRandomlyAddUnigramWord() local
248 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); in testRandomlyAddUnigramWord()
250 final String word = CodePointUtils.generateWord(random, codePointSet); in testRandomlyAddUnigramWord()
251 probabilityMap.put(word, random.nextInt(0xFF)); in testRandomlyAddUnigramWord()
319 final Random random = new Random(seed); in testRandomlyAddBigramWords() local
324 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); in testRandomlyAddBigramWords()
329 final String word = CodePointUtils.generateWord(random, codePointSet); in testRandomlyAddBigramWords()
331 final int unigramProbability = random.nextInt(0xFF); in testRandomlyAddBigramWords()
337 final String word0 = words.get(random.nextInt(wordCount)); in testRandomlyAddBigramWords()
338 final String word1 = words.get(random.nextInt(wordCount)); in testRandomlyAddBigramWords()
[all …]
DLatinImeStressTests.java32 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/tools/dicttool/tests/com/android/inputmethod/latin/makedict/
DFusionDictionaryTest.java40 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/
DAlbumSetLoader.java39 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/
DUserHistoryDictionaryTests.java120 final Random random = new Random(123456); in doTestRandomWords() local
122 dict, numberOfWords, random, true /* checksContents */, mCurrentTime)); in doTestRandomWords()
151 final Random random = new Random(123456); in doTestStressTestForSwitchingLanguagesAndAddingWords() local
174 random, in doTestStressTestForSwitchingLanguagesAndAddingWords()
205 final Random random = new Random(123456); in doTestAddManyWords() local
210 numberOfWords, random, true /* checksContents */, mCurrentTime)); in doTestAddManyWords()
DUserHistoryDictionaryTestsHelper.java78 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/Email/tests/src/com/android/emailcommon/utility/
DSSLUtilsTest.java76 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/
DSimpleTempStorage.java45 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/
DSlideshowView.java128 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/
DDataExporter.java76 final byte[] random = new byte[256 / 8]; in generateRandomName()
77 rng.nextBytes(random); in generateRandomName()
79 return Hex.encodeHex(random, true); in generateRandomName()
/packages/experimental/StrictModeTest/src/com/android/strictmodetest/
DStrictModeActivity.java167 String random = "" + Math.random(); in onCreate()
168 random = random.substring(random.indexOf(".") + 1); in onCreate()
169 String domain = random + ".livejournal.com"; in onCreate()
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
DBummerView.java52 final float newx = (float) (Math.random() * (framew - textw));
53 final float newy = (float) (Math.random() * (frameh - texth));
/packages/experimental/Bummer/src/com/android/dreams/bummer/
DBummerView.java52 final float newx = (float) (Math.random() * (framew - textw));
53 final float newy = (float) (Math.random() * (frameh - texth));
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/
DTestVideoProvider.java59 private Random random; field in TestVideoProvider
80 random = new Random(); in TestVideoProvider()
188 long dataUsageKb = (10 *1024) + random.nextInt(50 * 1024); in onRequestConnectionDataUsage()
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/
DBinaryDictOffdeviceUtilsTests.java67 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/apps/TV/tests/unit/src/com/android/tv/recommendation/
DRecommendationUtils.java81 public void resetRandom(Random random) { in resetRandom() argument
82 mRandom = random; in resetRandom()
/packages/apps/Nfc/src/com/android/nfc/beam/
DFireflyRenderer.java382 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/apps/Gallery2/src/com/android/gallery3d/gadget/
DLocalPhotoSource.java108 Random random = new Random(); in getExponentialIndice() local
112 int row = (int)(-Math.log(random.nextDouble()) * total / 2); in getExponentialIndice()
/packages/apps/Nfc/src/com/android/nfc/handover/
DHandoverDataParser.java101 byte[] random = new byte[2]; in createCollisionRecord()
102 new Random().nextBytes(random); in createCollisionRecord()
103 return new NdefRecord(NdefRecord.TNF_WELL_KNOWN, RTD_COLLISION_RESOLUTION, null, random); in createCollisionRecord()
/packages/apps/TV/src/com/android/tv/recommendation/
DRandomEvaluator.java22 return Math.random(); in evaluateChannel()
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/
DSSLSocketFactory.java182 final SecureRandom random, in SSLSocketFactory() argument
199 sslcontext.init(keymanagers, trustmanagers, random); in SSLSocketFactory()
/packages/screensavers/Basic/src/com/android/dreams/basic/
DColorsGLRenderer.java357 cornerFrequencies[i] = 1f + (float)(Math.random() * 5); in Square()
359 cornerRotation = (int)(Math.random() * vertexCount); in Square()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DSlideshowPage.java197 boolean random = data.getBoolean(KEY_RANDOM_ORDER, false); in initializeData()
204 if (random) { in initializeData()
/packages/services/Telephony/src/com/android/phone/common/mail/internet/
DMimeMultipart.java61 sb.append(Integer.toString((int)(Math.random() * 35), 36)); in generateBoundary()

12