/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/modules/Uwb/service/tests/src/com/android/server/uwb/correction/math/ |
D | MatrixTest.java | 80 RandomTestData random = new RandomTestData(); in transformPoint_isConsistentWithPoseTransformPoint() local 82 Pose pose = random.nextPose(); in transformPoint_isConsistentWithPoseTransformPoint() 83 Vector3 initial = random.nextVector(); in transformPoint_isConsistentWithPoseTransformPoint() 95 RandomTestData random = new RandomTestData(); in newRigidTransform_isEquivalentToTrsWithoutScale() local 97 Pose pose = random.nextPose(); in newRigidTransform_isEquivalentToTrsWithoutScale() 120 RandomTestData random = new RandomTestData(); in newTrs_isEquivalentToMultiplyingTranslationRotationScale() local 122 Vector3 translation = random.nextVector(); in newTrs_isEquivalentToMultiplyingTranslationRotationScale() 123 Quaternion rotation = random.nextRotation(); in newTrs_isEquivalentToMultiplyingTranslationRotationScale() 124 Vector3 scale = random.nextVector(); in newTrs_isEquivalentToMultiplyingTranslationRotationScale() 145 RandomTestData random = new RandomTestData(); in newScale_uniformScaleMatricesAreEqual() local [all …]
|
/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/modules/NeuralNetworks/common/random/ |
D | guarded_philox_random.cc | 25 seed = random::New64(); in Init() 26 seed2 = random::New64(); in Init() 29 generator_ = random::PhiloxRandom(seed, seed2); in Init() 33 void GuardedPhiloxRandom::Init(random::PhiloxRandom::ResultType counter, in Init() 34 random::PhiloxRandom::Key key) { in Init() 37 generator_ = random::PhiloxRandom(counter, key); in Init() 41 random::PhiloxRandom GuardedPhiloxRandom::ReserveSamples128(int64 samples) { in ReserveSamples128()
|
D | guarded_philox_random.h | 51 void Init(random::PhiloxRandom::ResultType counter, random::PhiloxRandom::Key key); 56 random::PhiloxRandom ReserveSamples128(int64 samples); 59 random::PhiloxRandom ReserveSamples32(int64 samples) { in ReserveSamples32() 64 random::PhiloxRandom ReserveRandomOutputs(int64 output_count, int multiplier) { in ReserveRandomOutputs() 71 random::PhiloxRandom generator_; // GUARDED_BY(mu_);
|
/packages/modules/Bluetooth/system/gd/security/ |
D | pairing_handler_le_secure_connections.cc | 263 auto random = WaitPairingRandom(); in SecureConnectionsOutOfBand() local 264 if (std::holds_alternative<PairingFailure>(random)) { in SecureConnectionsOutOfBand() 265 return std::get<PairingFailure>(random); in SecureConnectionsOutOfBand() 267 Nb = std::get<PairingRandomView>(random).GetRandomValue(); in SecureConnectionsOutOfBand() 274 auto random = WaitPairingRandom(); in SecureConnectionsOutOfBand() local 275 if (std::holds_alternative<PairingFailure>(random)) { in SecureConnectionsOutOfBand() 276 return std::get<PairingFailure>(random); in SecureConnectionsOutOfBand() 278 Na = std::get<PairingRandomView>(random).GetRandomValue(); in SecureConnectionsOutOfBand() 349 auto random = WaitPairingRandom(); in SecureConnectionsPasskeyEntry() local 350 if (std::holds_alternative<PairingFailure>(random)) { in SecureConnectionsPasskeyEntry() [all …]
|
/packages/modules/StatsD/lib/libkll/tests/ |
D | compactor_stack_test.cpp | 157 MTRandomGenerator random(10); in TEST_F() local 158 CompactorStack compactor_stack(10, 10, &random); in TEST_F() 193 MTRandomGenerator random(rd()); in TEST_P() local 194 CompactorStack compactor_stack(params.inv_eps, params.inv_delta, &random); in TEST_P() 196 int upbound = (random.UnbiasedUniform(3) + 1) * params.num_items + 1; in TEST_P() 198 compactor_stack.Add(random.UnbiasedUniform(std::numeric_limits<uint64_t>::max())); in TEST_P() 227 MTRandomGenerator random = MTRandomGenerator(seed); in TEST_P() local 228 CompactorStack compactor_stack(params.inv_eps, params.inv_delta, &random); in TEST_P() 231 compactor_stack.Add(random.UnbiasedUniform(std::numeric_limits<uint32_t>::max())); in TEST_P() 235 compactor_stack.Add(random.UnbiasedUniform(std::numeric_limits<uint64_t>::max())); in TEST_P() [all …]
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/ |
D | TranscodeHelperTest.java | 89 Random random = new Random(System.currentTimeMillis()); in testDoesNotTranscodeForMediaProvider() local 92 int randomAppUid = random.nextInt( in testDoesNotTranscodeForMediaProvider() 101 Random random = new Random(System.currentTimeMillis()); in testDoesNotTranscodeForSystemProcesses() local 102 int randomSystemProcessUid = random.nextInt(Process.FIRST_APPLICATION_UID); in testDoesNotTranscodeForSystemProcesses() 110 Random random = new Random(System.currentTimeMillis()); in testDoesNotTranscodeIfAppAcceptsOriginalFormat() local 113 int randomAppUid = random.nextInt( in testDoesNotTranscodeIfAppAcceptsOriginalFormat() 123 Random random = new Random(System.currentTimeMillis()); in testDoesNotTranscodeIfAppExtraMediaCapabilitiesHevc_supported() local 129 int randomAppUid = random.nextInt( in testDoesNotTranscodeIfAppExtraMediaCapabilitiesHevc_supported() 139 Random random = new Random(System.currentTimeMillis()); in testTranscodesIfAppExtraMediaCapabilitiesHevc_unsupported() local 145 int randomAppUid = random.nextInt( in testTranscodesIfAppExtraMediaCapabilitiesHevc_unsupported()
|
/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/modules/StatsD/lib/libkll/include/ |
D | kll.h | 77 KllQuantile(int64_t inv_eps, int64_t inv_delta, int k, RandomGenerator* random) in KllQuantile() argument 79 owned_random_(random != nullptr ? nullptr : std::make_unique<MTRandomGenerator>()), in KllQuantile() 81 random != nullptr ? random : owned_random_.get()) { in KllQuantile() 129 void set_random(RandomGenerator* random) { in set_random() argument 130 random_ = random; in set_random() 141 RandomGenerator* random() const { in random() function
|
D | compactor_stack.h | 40 CompactorStack(int64_t inv_eps, int64_t inv_delta, RandomGenerator* random); 41 CompactorStack(int64_t inv_eps, int64_t inv_delta, int k, RandomGenerator* random); 82 RandomGenerator* random() { in random() function
|
/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/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/ |
D | IkeNoncePayload.java | 74 SecureRandom random = randomnessFactory.getRandom(); in IkeNoncePayload() local 75 random = random == null ? new SecureRandom() : random; in IkeNoncePayload() 76 random.nextBytes(nonceData); in IkeNoncePayload()
|
/packages/modules/AdServices/sdksandbox/tests/manual-test-apps/SdkSandboxCodeProvider/src/com/android/sdksandboxcode_1/ |
D | SampleSandboxedSdkProvider.java | 107 final Random random = new Random(); in getView() local 111 random.nextInt(256), in getView() 112 random.nextInt(256), in getView() 113 random.nextInt(256))); in getView() 121 random.nextInt(256), in getView() 122 random.nextInt(256), in getView() 123 random.nextInt(256))); in getView() 182 Random random = new Random(); in onDraw() local 236 int c = Color.rgb(random.nextInt(256), random.nextInt(256), random.nextInt(256)); in onDraw()
|
/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/modules/Bluetooth/system/gd/hci/ |
D | le_address_manager.cc | 464 std::array<uint8_t, 6> random = os::GenerateRandom<6>(); in generate_nrpa() local 465 random[5] &= ~BLE_ADDR_MASK; in generate_nrpa() 466 …if ((random[0] == 0x00 && random[1] == 0x00 && random[2] == 0x00 && random[3] == 0x00 && random[4]… in generate_nrpa() 467 random[5] == 0x00) || in generate_nrpa() 468 …(random[0] == 0xFF && random[1] == 0xFF && random[2] == 0xFF && random[3] == 0xFF && random[4] == … in generate_nrpa() 469 random[5] == 0x3F)) { in generate_nrpa() 470 random[0] = (uint8_t)(os::GenerateRandom() % 0xFE + 1); in generate_nrpa() 474 address.FromOctets(random.data()); in generate_nrpa()
|
/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/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/ |
D | CombinatoricsInfoGainPeakParameterizedTest.java | 53 Random random = new Random(); in getTestCaseForRandomState() local 59 random.nextInt(MAX_Q1 - 1) + 1, in getTestCaseForRandomState() 60 random.nextInt(MAX_Q2 - 1) + 1, in getTestCaseForRandomState() 61 random.nextInt(MAX_K - 1) + 1 in getTestCaseForRandomState()
|
/packages/modules/HealthFitness/testapps/toolbox/src/com/android/healthconnect/testapps/toolbox/seed/ |
D | SeedData.kt | 39 import kotlin.random.Random as ktRandom in <lambda>() 96 val random = Random() in <lambda>() constant 102 Pair(getValidHeartRate(random), start.plus(ofMinutes(timeOffset + i)))) in <lambda>() 138 .setMeasurementLocation(VALID_READING_LOCATIONS.random()) in <lambda>() 159 private fun getValidHeartRate(random: Random): Long { in <lambda>() 160 return (random.nextInt(20) + 80).toLong() in <lambda>()
|
/packages/modules/Telephony/libs/TelephonyStatsLib/tests/com/android/telephony/statslib/ |
D | StatsLibTest.java | 138 Random random = new Random(); in testAppendPulledAtom() local 139 int count1 = random.nextInt(100); in testAppendPulledAtom() 140 int count2 = random.nextInt(1000); in testAppendPulledAtom() 141 int count3 = random.nextInt(10000); in testAppendPulledAtom() 142 int count4 = random.nextInt(100000); in testAppendPulledAtom()
|
/packages/modules/StatsD/lib/libkll/ |
D | sampler.cpp | 36 if (compactor_stack_->random()->UnbiasedUniform(++item_weight_) == 0) { in Add() 49 if (compactor_stack_->random()->UnbiasedUniform(item_weight_) < in AddWithWeight() 55 if (compactor_stack_->random()->UnbiasedUniform(capacity_) < in AddWithWeight()
|
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/utils/ |
D | IkeSpiGenerator.java | 34 SecureRandom random = randomnessFactory.getRandom(); in IkeSpiGenerator() local 35 mRandom = random == null ? new SecureRandom() : random; in IkeSpiGenerator()
|
/packages/providers/MediaProvider/src/com/android/providers/media/metrics/ |
D | TranscodeMetrics.java | 90 Random random = new Random(System.currentTimeMillis()); in doRandomSampling() local 94 int randomIndex = random.nextInt(TRANSCODING_STATS_DATA.size() - i /* bound */) in doRandomSampling() 129 Random random = new Random(System.currentTimeMillis()); in checkAndLimitStatsDataSizeAfterAddition() local 130 int replaceIndex = random.nextInt(sTotalStatsDataCount /* bound */); in checkAndLimitStatsDataSizeAfterAddition()
|