Added missing --pct-syskeys to processOptions in Monkey

According to the developer guidelines
http://developer.android.com/guide/developing/tools/monkey.html
it should be possible to run monkey with option --pct-syskeys <percent>
to adjust percentage of "system" key events. (These are keys that are
generally reserved for use by the system, such as Home, Back,
Start Call, End Call, or Volume controls.) However, when trying
to run monkey with that option it fails with:
** Error: Unknown option: --pct-syskeys
The function processOptions in file Monkey.java was missing the
option --pct-syskeys.

Change-Id: I5d328fc93dfe67ed7a905735d6762c7f91c69838
This commit is contained in:
Johan Alfven
2010-05-11 09:05:28 +02:00
committed by Johan Redestig
parent 36cb47e677
commit f515f1a6c8

View File

@@ -562,6 +562,9 @@ public class Monkey {
} else if (opt.equals("--pct-trackball")) { } else if (opt.equals("--pct-trackball")) {
int i = MonkeySourceRandom.FACTOR_TRACKBALL; int i = MonkeySourceRandom.FACTOR_TRACKBALL;
mFactors[i] = -nextOptionLong("trackball events percentage"); mFactors[i] = -nextOptionLong("trackball events percentage");
} else if (opt.equals("--pct-syskeys")) {
int i = MonkeySourceRandom.FACTOR_SYSOPS;
mFactors[i] = -nextOptionLong("system (key) operations percentage");
} else if (opt.equals("--pct-nav")) { } else if (opt.equals("--pct-nav")) {
int i = MonkeySourceRandom.FACTOR_NAV; int i = MonkeySourceRandom.FACTOR_NAV;
mFactors[i] = -nextOptionLong("nav events percentage"); mFactors[i] = -nextOptionLong("nav events percentage");