Add the new volume mute key as a system key.
Use virtual keyboard during injection.
Also fixed a deprecation warning for using an old Intent API.
Bug: 2912307
Bug: 3221301
Change-Id: I056844509112727aa3541223f090cc500c55fc41
Merge commit '35ccee0b22501feda0249dfcaaff2a9fdcd363b6'
* commit '35ccee0b22501feda0249dfcaaff2a9fdcd363b6':
1) add the bugreport option which allow the scripted monkey to capature the bugrepor and save it to the sdcard wherenever there is a ANR, java crash and native crash.
Merge commit '9bfa6f90b8c56ed7404c0c07a70e27a9fbad3c23' into gingerbread-plus-aosp
* commit '9bfa6f90b8c56ed7404c0c07a70e27a9fbad3c23':
1) add the bugreport option which allow the scripted monkey to capature the bugrepor and save it to the sdcard wherenever there is a ANR, java crash and native crash.
2) Add a new option in the scripted monkey which can enter a string through the shell command input text <string>
Change-Id: Iab7478fdc594c07e5166091d29dc644e430e43cb
KeyEvent now offers an (@hidden) method to map keycodes to symbolic names
in a way that is compatible with what Monkey was already doing itself.
Now we shouldn't need to change monkey each time we add new keycodes.
Bug: 2912307
Change-Id: I9cd729b17c3f19505a4d3afcce465dad0c64cce0
Merge commit '9c1a73ba8a6b6cee05f235ef71975c427a9f3a3c' into gingerbread-plus-aosp
* commit '9c1a73ba8a6b6cee05f235ef71975c427a9f3a3c':
Update Monkey to new StrictMode API.
Merge commit 'd424b8d9ccb569c4a2f01de248068fd130e3bd82' into gingerbread-plus-aosp
* commit 'd424b8d9ccb569c4a2f01de248068fd130e3bd82':
Prepare for a new IActivityController method.
Merge commit '67aad2d8d51e9d48730f0c6e4848c60b1a9d0798' into gingerbread-plus-aosp
* commit '67aad2d8d51e9d48730f0c6e4848c60b1a9d0798':
Add the simple script log for the statbility stress test.
Merge commit 'ea7d6e8e6568b777693c52183e9abf973786a6b5' into gingerbread-plus-aosp
* commit 'ea7d6e8e6568b777693c52183e9abf973786a6b5':
Add the new option for the device sleep time. This is only for the scripted monkey.
The monkey writes to System.out which is effectively a file and is
caught by StrictMode.
BUG=2947447
Change-Id: Iab38917f18baa319dad34d0c788bc9a10a041796
Merge commit '27d0ec1e87dcf41960f87f203c1822e88f99ea38' into gingerbread-plus-aosp
* commit '27d0ec1e87dcf41960f87f203c1822e88f99ea38':
Add the new option for the scripted monkey profile testing.
Merge commit '3307fdcce1f322ed72cc3d3a8d9da87aae856531' into gingerbread-plus-aosp
* commit '3307fdcce1f322ed72cc3d3a8d9da87aae856531':
Added the new keyword tap for the scripted monkey.
Merge commit 'b409cf9ca1251df1145139580f6809364fb3881f' into gingerbread-plus-aosp
* commit 'b409cf9ca1251df1145139580f6809364fb3881f':
Add the monkey event which allows the scripted monkey to execute the shell command.
Merge commit '4388d2c333c164ce67db6d4a59cded8dfea9fc9a' into gingerbread-plus-aosp
* commit '4388d2c333c164ce67db6d4a59cded8dfea9fc9a':
Monkey: Set the name of the process to distinguish from generic name (app_process)
Merge commit '688e62cd116d0bc17ad162915908764c67dd6045' into gingerbread-plus-aosp
* commit '688e62cd116d0bc17ad162915908764c67dd6045':
Monkey: Changes to release lock before reporting ANR and meminfo
Report ANR, dumpsys after releasing lock on Monkey.this.
This ensures the availability of the lock to Activity controller's
appNotResponding.
Reporting dumpsys while holding the lock on this causes a cyclic
deadlock, when twoANRs are reported (one after the other).
Monkey's ActivityController is registered to ActivityManagerService
for handling ANR.The first ANR caused by either service timeout or
broadcast timeout is reported byActivityManagerService to Monkey's
ActivityController via Binder. Meanwhile, the lock on
ActivityManagerService is held by serviceTimeout or broadcastTimeout.
appNotResponding corresponding to first ANR reports procrank and
acquires a lock onMonkey.this and sets few bool variables like
mRequestAnrTraces and mRequestDumpsysMemInfoand returns the control
to ActivityManagerService's service/broadcast timeout.
VM executing monkey process switches the control to main monkey
thread and it acquires thelock on Monkey.this and proceeds to report
ANR traces.
Meanwhile, a second ANR occurs and Activity Manager Service invokes
ActivityController's appNotResponding (via binder). appNotResponding
reports the procrank and waits to acquire the lock on Monkey.this
which is being held by Monkey's main thread(busy reporting first ANR).
This results in a blocking wait for ActivityManagerService's
appNotRespondingLocked() (corresponding to second ANR).
Meanwhile, the monkey's main thread (holding lock on Monkey.this)
tries to report the meminfo for first ANR, invokes
reportDumpsysMemInfo(), which in turn causes the android runtime to
launch dumpsys process. The dumpsys process queries service manager
to get a reference to meminfo service and invoke dump() on the same.
The meminfo service is created by ActivityManagerService's
setSystemProcess(). The dump() method tries to acquire a lock on
ActivityManagerService which is held by ActivityManagerService's
service/broadcasttimeout (awaiting the response from
ActivityController for the second ANR).
This cyclic deadlock continues for a minute after which WatchDog
thread of system_server kills system_server as it hasn't got the
response from ActivityManagerService's monitor(). The monitor()
of ActivityManagerService too tries to acquire lock on this and is
invoked once in every minute.
DEADLOCK:
--------
ActivityManager --> ActivityController --> Monkey Main --> MemInfo
--> ActivityManager
Change-Id: I7718eff332e5551b1950ab1c45395bf1ff4b1bda
Merge commit '34ca4b646b20cc209b06fec482e6c77dbc92d220' into gingerbread
* commit '34ca4b646b20cc209b06fec482e6c77dbc92d220':
Add the support for the alarmManager and force the device to wake up.
Merge commit '1a132581a5ce6188989d8522d227392c05cb42f6' into froyo-plus-aosp
* commit '1a132581a5ce6188989d8522d227392c05cb42f6':
Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out.
Merge commit '1a132581a5ce6188989d8522d227392c05cb42f6' into gingerbread
* commit '1a132581a5ce6188989d8522d227392c05cb42f6':
Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out.
Merge commit '39d7a7451b7e43dc1d71ac983821e76c88775a81' into froyo-plus-aosp
* commit '39d7a7451b7e43dc1d71ac983821e76c88775a81':
Added the instrumentation and power log monkey events fro the new power framework.
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