* Cleaned up extra whitespace & made vertical whitespace more consistent
* 100col wrap
* Remove unused imports
* Add @Override where necessary
Change-Id: I1ad404ffc4ce7fa9c4b661f7cc1783c86356316b
Also re-arrange all preference API demos to go in their own
package, since the preferfence APIs themselves are in their own package.
Change-Id: I305f77dc09748bb60d1de8a23d063db64c11bb1e
Includes changes to add CDD PDF and CTS ZIP to the
downloads page, and adds a blurb on the landing page in the "News" section.
Change-Id: I8fac5ceddec21df5c2d81794a3e1f7c92e89720e
Merge commit '7d3106bebbfe76a334567c59303a75897af915b2'
* commit '7d3106bebbfe76a334567c59303a75897af915b2':
Re-organize the SDK, moving the build tools out of the platforms.
Merge commit 'b86b7f72db1549cb526a141ca8b6158908483f1a' into gingerbread-plus-aosp
* commit 'b86b7f72db1549cb526a141ca8b6158908483f1a':
Re-organize the SDK, moving the build tools out of the platforms.
Merge commit 'd1314040fefdae9ebade02e2af072a3cf6e9d844'
* commit 'd1314040fefdae9ebade02e2af072a3cf6e9d844':
Separate platform files and samples by API level.
Merge commit 'f4790e6f9e47347996e62ecd27ff55b6499cf97a' into gingerbread-plus-aosp
* commit 'f4790e6f9e47347996e62ecd27ff55b6499cf97a':
Separate platform files and samples by API level.
Remove all duplicate platform files, i.e development/ndk/platforms/android-N now
only contains files that are introduced in API level 'N' and not found in level 'N-1'
(This makes it easier to manage independent platform release branches, and makes
platform additions trivial to examine and maintain).
Move samples that depends on features of API level 'N' into platforms/android-N/samples
+ update tests/run-all.sh accordingly
Change-Id: I04c4c67c6c674c1714d5812d461d0524a4f4cfd9
Merge commit '8ddb2873df96c7181c9358f5c9286e273648bf89' into gingerbread-plus-aosp
* commit '8ddb2873df96c7181c9358f5c9286e273648bf89':
Change hosttestlib to use ddm-prebuilt.
Merge commit '255ee00edcb05e4477771f5de7351ada4a2ab6ce'
* commit '255ee00edcb05e4477771f5de7351ada4a2ab6ce':
Remove monkeyrunner so it can move to the SDK project.
Merge commit '32553f5291b1e0c5363db8bd7f280037f4f600e2' into gingerbread-plus-aosp
* commit '32553f5291b1e0c5363db8bd7f280037f4f600e2':
Remove monkeyrunner so it can move to the SDK project.
Merge commit 'b5ebc48565ceb23feba21cc12fbbb2cc34802209'
* commit 'b5ebc48565ceb23feba21cc12fbbb2cc34802209':
Update time zone data to the new version 2010k.
Merge commit 'cc7fc9e839cee6c33d099a94c5bdb655bd83ccd9' into gingerbread-plus-aosp
* commit 'cc7fc9e839cee6c33d099a94c5bdb655bd83ccd9':
Update time zone data to the new version 2010k.
Merge commit '0637952dc18fcaae9192d0301a233b3b650bb094'
* commit '0637952dc18fcaae9192d0301a233b3b650bb094':
Update the monkeyrunner to use the new DDMlib API.
Merge commit '235a95ae49e9dd40003e99c35bd79fe007347fb3' into gingerbread-plus-aosp
* commit '235a95ae49e9dd40003e99c35bd79fe007347fb3':
Update the monkeyrunner to use the new DDMlib API.
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