/frameworks/base/packages/EasterEgg/src/com/android/egg/landroid/ |
D | Namer.kt | 65 fun describePlanet(rng: Random): String { in describePlanet() 66 return planetTable.roll(rng).pull(rng) + " " + planetTypes.pull(rng) in describePlanet() 69 fun describeLife(rng: Random): String { in describeLife() 70 return lifeTable.roll(rng).pull(rng) in describeLife() 73 fun nameSystem(rng: Random): String { in nameSystem() 75 parts.append(constellationsTable.roll(rng).pull(rng)) in nameSystem() 76 if (rng.nextFloat() <= SUFFIX_PROB) { in nameSystem() 77 parts.append(delimiterTable.roll(rng)) in nameSystem() 78 parts.append(suffixesTable.roll(rng).pull(rng)) in nameSystem() 79 if (rng.nextFloat() <= RARE_PROB) parts.append(' ').append(suffixesRare.pull(rng)) in nameSystem() [all …]
|
D | Universe.kt | 188 val systemName = namer.nameSystem(rng) in initRandom() 191 cls = rng.choose(StarClass.values()), in initRandom() 192 radius = rng.nextFloatInRange(STAR_RADIUS_RANGE) in initRandom() 195 repeat(rng.nextInt(NUM_PLANETS_RANGE.first, NUM_PLANETS_RANGE.last + 1)) { in initRandom() 196 val radius = rng.nextFloatInRange(PLANET_RADIUS_RANGE) in initRandom() 201 rng.nextFloat().pow(1f) in initRandom() 212 pos = star.pos + Vec2.makeWithAngleMag(rng.nextFloat() * PI2f, orbitRadius), in initRandom() 220 p.description = namer.describePlanet(rng) in initRandom() 221 p.atmosphere = namer.describeAtmo(rng) in initRandom() 222 p.flora = namer.describeLife(rng) in initRandom() [all …]
|
D | Randomness.kt | 30 fun pull(rng: Random): T { in pull() 32 remaining.shuffle(rng) in pull() 47 fun roll(rng: Random): T { in roll() 48 var x = rng.nextFloatInRange(0f, total) in roll()
|
D | ComposeTools.kt | 32 fun flickerFadeEasing(rng: Random) = Easing { frac -> if (rng.nextFloat() < frac) 1f else 0f } in flickerFadeEasing()
|
D | Physics.kt | 114 val rng = Random(randomSeed) constant in com.android.egg.landroid.Simulator
|
/frameworks/base/apct-tests/perftests/core/src/android/opengl/perftests/ |
D | MatrixPerfTest.java | 44 Random rng = new Random(); in testMultiplyMM() local 46 array[i] = rng.nextFloat(); in testMultiplyMM() 57 Random rng = new Random(); in testMultiplyMMLeftOverlapResult() local 59 array[i] = rng.nextFloat(); in testMultiplyMMLeftOverlapResult() 70 Random rng = new Random(); in testMultiplyMMRightOverlapResult() local 72 array[i] = rng.nextFloat(); in testMultiplyMMRightOverlapResult() 83 Random rng = new Random(); in testMultiplyMMAllOverlap() local 85 array[i] = rng.nextFloat(); in testMultiplyMMAllOverlap() 96 Random rng = new Random(); in testMultiplyMMOutputBigArray() local 98 array[i] = rng.nextFloat(); in testMultiplyMMOutputBigArray() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/libcore/regression/ |
D | RandomPerfTest.java | 41 Random rng = new Random(); in timeNewRandom() local 42 rng.nextInt(); in timeNewRandom() 48 Random rng = new Random(); in timeReusedRandom() local 51 rng.nextInt(); in timeReusedRandom() 57 SecureRandom rng = new SecureRandom(); in timeReusedSecureRandom() local 60 rng.nextInt(); in timeReusedSecureRandom() 68 SecureRandom rng = new SecureRandom(); in timeNewSecureRandom() local 69 rng.nextInt(); in timeNewSecureRandom()
|
/frameworks/base/keystore/java/android/security/keystore2/ |
D | KeyStoreCryptoOperationUtils.java | 161 static byte[] getRandomBytesToMixIntoKeystoreRng(SecureRandom rng, int sizeBytes) { in getRandomBytesToMixIntoKeystoreRng() argument 165 if (rng == null) { in getRandomBytesToMixIntoKeystoreRng() 166 rng = getRng(); in getRandomBytesToMixIntoKeystoreRng() 169 rng.nextBytes(result); in getRandomBytesToMixIntoKeystoreRng()
|
/frameworks/base/tools/codegen/src/com/android/codegen/ |
D | FileInfo.kt | 143 … val range: ClosedRange<Int> = ast.range.get()!!.let { rng -> rng.begin.line-1..rng.end.line-1 }, in <lambda>() method 231 var generatedCode = classBounds.generatedCodeRange?.let { rng -> in <lambda>() method 233 rng.start, rng.endInclusive+1)) in <lambda>()
|
/frameworks/base/core/java/android/content/pm/ |
D | VerifierDeviceIdentity.java | 93 public static VerifierDeviceIdentity generate(Random rng) { in generate() argument 94 long identity = rng.nextLong(); in generate()
|
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/ |
D | NekoService.java | 101 final Random rng = new Random(); in triggerFoodResponse() local 102 if (rng.nextFloat() <= CAT_CAPTURE_PROB) { in triggerFoodResponse() 113 if (cats.size() == 0 || rng.nextFloat() <= new_cat_prob) { in triggerFoodResponse()
|
D | NekoControlsService.kt | 76 private val rng = Random() constant 116 return Icon.createWithResource(resources, Cat.chooseP(rng, P_TOY_ICONS, 4)) in randomToyIcon()
|
/frameworks/base/core/tests/coretests/src/android/app/ |
D | DownloadManagerBaseTest.java | 314 protected byte[] generateData(int size, DataType type, Random rng) { in generateData() argument 326 if (rng == null) { in generateData() 327 rng = new LoggingRng(); in generateData() 331 result[i] = (byte) (min + rng.nextInt(max - min + 1)); in generateData() 618 Random rng = new LoggingRng(); in createFileOnSD() local 619 byte[] chunkSizeData = generateData(nextChunkSize, type, rng); in createFileOnSD() 626 randomData = generateData(nextChunkSize, type, rng); in createFileOnSD()
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | Base64Test.java | 322 Random rng = new Random(32176L); in testInputStream() local 362 int l = writeLengths[rng.nextInt(writeLengths.length)]; in testInputStream() 401 int l = writeLengths[rng.nextInt(writeLengths.length)]; in testInputStream() 437 Random rng = new Random(32176L); in testOutputStream() local 477 int l = writeLengths[rng.nextInt(writeLengths.length)]; in testOutputStream() 520 int l = writeLengths[rng.nextInt(writeLengths.length)]; in testOutputStream()
|
/frameworks/base/core/java/com/android/internal/app/ |
D | PlatLogoActivity.java | 420 Starfield(Random rng, float size) { in Starfield() argument 421 mRng = rng; in Starfield()
|