Merge "Make all monkeys do the same thing" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c6fbad006a
@@ -516,6 +516,10 @@ public class Monkey {
|
|||||||
mMainCategories.add(Intent.CATEGORY_MONKEY);
|
mMainCategories.add(Intent.CATEGORY_MONKEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mSeed == 0) {
|
||||||
|
mSeed = System.currentTimeMillis() + System.identityHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (mVerbose > 0) {
|
if (mVerbose > 0) {
|
||||||
System.out.println(":Monkey: seed=" + mSeed + " count=" + mCount);
|
System.out.println(":Monkey: seed=" + mSeed + " count=" + mCount);
|
||||||
if (mValidPackages.size() > 0) {
|
if (mValidPackages.size() > 0) {
|
||||||
@@ -550,8 +554,7 @@ public class Monkey {
|
|||||||
return -4;
|
return -4;
|
||||||
}
|
}
|
||||||
|
|
||||||
mRandom = new SecureRandom();
|
mRandom = new Random(mSeed);
|
||||||
mRandom.setSeed((mSeed == 0) ? -1 : mSeed);
|
|
||||||
|
|
||||||
if (mScriptFileNames != null && mScriptFileNames.size() == 1) {
|
if (mScriptFileNames != null && mScriptFileNames.size() == 1) {
|
||||||
// script mode, ignore other options
|
// script mode, ignore other options
|
||||||
|
|||||||
Reference in New Issue
Block a user