Home
last modified time | relevance | path

Searched refs:mRandom (Results 1 – 13 of 13) sorted by relevance

/development/samples/training/multiscreen/newsreader/src/com/example/android/newsreader/
DNonsenseGenerator.java29 Random mRandom; field in NonsenseGenerator
63 mRandom = new Random(); in NonsenseGenerator()
106 if (!isHeadline && mRandom.nextInt(4) == 0) in generateSentence()
113 if (mRandom.nextInt(2) == 0) { in generateTimeClause()
128 if (mRandom.nextInt(3) != 0) { in generateAgent()
138 if (mRandom.nextInt(3) != 0) { in generatePredicate()
143 if (mRandom.nextInt(3) == 0) { in generatePredicate()
148 if (mRandom.nextInt(3) != 0) { in generatePredicate()
156 return options[mRandom.nextInt(options.length)]; in pickOneOf()
/development/cmds/monkey/src/com/android/commands/monkey/
DMonkeyEventQueue.java28 private Random mRandom; field in MonkeyEventQueue
34 mRandom = random; in MonkeyEventQueue()
45 throttle = mRandom.nextLong(); in addLast()
DMonkeySourceRandom.java99 private Random mRandom; field in MonkeySourceRandom
138 mRandom = random; in MonkeySourceRandom()
395 float cls = mRandom.nextFloat(); in generateEvents()
399 generatePointerEvent(mRandom, GESTURE_TAP); in generateEvents()
402 generatePointerEvent(mRandom, GESTURE_DRAG); in generateEvents()
405 generatePointerEvent(mRandom, GESTURE_PINCH_OR_ZOOM); in generateEvents()
408 generateTrackballEvent(mRandom); in generateEvents()
411 generateRotationEvent(mRandom); in generateEvents()
418 lastKey = NAV_KEYS[mRandom.nextInt(NAV_KEYS.length)]; in generateEvents()
420 lastKey = MAJOR_NAV_KEYS[mRandom.nextInt(MAJOR_NAV_KEYS.length)]; in generateEvents()
[all …]
DMonkeySourceRandomScript.java39 private Random mRandom; field in MonkeySourceRandomScript
68 mRandom = random; in MonkeySourceRandomScript()
102 mCurrentSource = mScriptSources.get(mRandom.nextInt(numSources)); in getNextEvent()
DMonkey.java209 Random mRandom = null; field in Monkey
594 mRandom = new Random(mSeed); in run()
598 mEventSource = new MonkeySourceScript(mRandom, mScriptFileNames.get(0), mThrottle, in run()
606 mScriptFileNames, mThrottle, mRandomizeThrottle, mRandom, in run()
611 mThrottle, mRandomizeThrottle, mRandom, in run()
629 … mEventSource = new MonkeySourceRandom(mRandom, mMainApps, mThrottle, mRandomizeThrottle); in run()
/development/apps/Development/src/com/android/development/
DMediaScannerActivity.java54 Random mRandom = new Random(); field in MediaScannerActivity
173 int baseYear = 1969 + mRandom.nextInt(30); in addAlbum()
190 map.put(Audio.Media.YEAR, baseYear + mRandom.nextInt(10)); in addAlbum()
225 mBuilder.append(elements[mRandom.nextInt(max)]); in getRandomWord()
234 boolean longfirst = mRandom.nextInt(5) < 3; in getRandomName()
237 switch (mRandom.nextInt(6)) { in getRandomName()
/development/samples/ApiDemos/src/com/example/android/apis/view/
DGameView.java50 private final Random mRandom; field in GameView
86 mRandom = new Random(); in GameView()
418 float size = mRandom.nextFloat() * (mMaxObstacleSize - mMinObstacleSize)
423 int edge = mRandom.nextInt(4);
427 positionY = mRandom.nextInt(getHeight());
431 positionY = mRandom.nextInt(getHeight());
434 positionX = mRandom.nextInt(getWidth());
438 positionX = mRandom.nextInt(getWidth());
447 float direction = mRandom.nextFloat() * (float) Math.PI * 2;
448 float speed = mRandom.nextFloat() * (mMaxObstacleSpeed - mMinObstacleSpeed)
/development/samples/RandomMusicPlayer/src/com/example/android/musicplayer/
DMusicRetriever.java44 Random mRandom = new Random(); field in MusicRetriever
109 return mItems.get(mRandom.nextInt(mItems.size())); in getRandomItem()
/development/samples/ControllerSample/src/com/example/controllersample/
DGameView.java60 private final Random mRandom; field in GameView
86 mRandom = new Random(); in GameView()
393 float size = mRandom.nextFloat() * (mMaxObstacleSize - mMinObstacleSize) in step()
396 int edge = mRandom.nextInt(4); in step()
400 positionY = mRandom.nextInt(getHeight()); in step()
404 positionY = mRandom.nextInt(getHeight()); in step()
407 positionX = mRandom.nextInt(getWidth()); in step()
411 positionX = mRandom.nextInt(getWidth()); in step()
435 float direction = mRandom.nextFloat() * (float) Math.PI * 2; in step()
436 float speed = mRandom.nextFloat() * (mMaxObstacleSpeed - mMinObstacleSpeed) in step()
/development/samples/ApiDemos/src/com/example/android/apis/graphics/kube/
DKube.java248 int layerID = mRandom.nextInt(9); in animate()
252 boolean direction = mRandom.nextBoolean(); in animate()
253 int count = mRandom.nextInt(3) + 1; in animate()
322 Random mRandom = new Random(System.currentTimeMillis()); field in Kube
/development/samples/Vault/src/com/example/android/vault/
DEncryptedDocument.java83 private final SecureRandom mRandom; field in EncryptedDocument
102 mRandom = new SecureRandom(); in EncryptedDocument()
317 mRandom.nextBytes(section.iv); in writeSection()
/development/samples/ApiDemos/src/com/example/android/apis/graphics/
DTouchPaint.java233 private final Random mRandom = new Random(); field in TouchPaint.PaintView
532 double direction = mRandom.nextDouble() * Math.PI * 2; in drawSplat()
533 double dispersion = mRandom.nextGaussian() * 0.2; in drawSplat()
/development/samples/JetBoy/src/com/example/android/jetboy/
DJetBoyView.java208 private Random mRandom = new Random(); field in JetBoyView.JetBoyThread
1013 int drawIndex = mRandom.nextInt(4); in doAsteroidCreation()