History log of /frameworks/base/core/tests/coretests/src/android/os/MessageQueueTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f90177629a5b69ca3a80466c0ab55abfeb6d26b2 01-Aug-2015 Abodunrinwa Toki <toki@google.com> Turn off failing tests in FrameworksCoreTests.

We want a green state so we can confidence in tests we write
going forward.

Change-Id: I2c8db848897b56d0c64202ad28861eb4a7572e07
/frameworks/base/core/tests/coretests/src/android/os/MessageQueueTest.java
a334e7c72408c4e2805f2427a35d841a60adefc4 24-Aug-2010 Wink Saville <wink@google.com> Allow reliable detection of a message that is in use.

Because the standard Looper.loop code calls Message#recycle it is
imperative that Handler#handleMessage code not attempt to resue
a message it receives. If allowed to do so it will cause bugs that
could be difficult to diagnois.

This change adds Message#flags and uses one bit to reliably detect
a message is in use and throws an error in MessageQueue#enqueueMessage.
This allows early detection of this bug.

Note: This is not new functionality, but the current implementation does
not detect messages that are in use because it uses Message#when != 0
as the detection mechanism. The problem is that a Message#when value of 0
is valid value used to place a message at the front of the queue and is
thus unreliable.

Another option is to change the setting of Message#when in Message#enqueueMessage
so that it is never 0, although that does change subtly a publicly accessible
field.

Yet another option would be to use other fields but all candidates have
similar problems as when in that they are publicly accessible or even
settable such as Message#target.

Change-Id: I040d6e546376f7b1ed1e4daa0d5644cce8bf333a
/frameworks/base/core/tests/coretests/src/android/os/MessageQueueTest.java
ddb2bfeb6e5a383306159672fe81333bf8520776 24-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> Revert "Allow reliable detection of a message that is in use."

This reverts commit 6083d81ce4d67ec632962270fda64ebb9db0d5b1.
Reverting this because it causes runtime to reboot in a loop
if connected to a Bluetooth Headset.

copyFrom() needs to check for the introduced bit too.
/frameworks/base/core/tests/coretests/src/android/os/MessageQueueTest.java
6083d81ce4d67ec632962270fda64ebb9db0d5b1 22-Aug-2010 Wink Saville <wink@google.com> Allow reliable detection of a message that is in use.

Because the standard Looper.loop code calls Message#recycle it is
imperative that Handler#handleMessage code not attempt to resue
a message it receives. If allowed to do so it will cause bugs that
could be difficult to diagnois.

This change adds Message#flags and uses one bit to reliably detect
a message is in use and throws an error in MessageQueue#enqueueMessage.
This allows early detection of this bug.

Note: This is not new functionality, but the current implementation does
not detect messages that are in use because it uses Message#when != 0
as the detection mechanism. The problem is that a Message#when value of 0
is valid value used to place a message at the front of the queue and is
thus unreliable.

Another option is to change the setting of Message#when in Message#enqueueMessage
so that it is never 0, although that does change subtly a publicly accessible
field.

Yet another option would be to use other fields but all candidates have
similar problems as when in that they are publicly accessible or even
settable such as Message#target.

Change-Id: I2df600537700a3fe206678f38bcae7329751c4e5
/frameworks/base/core/tests/coretests/src/android/os/MessageQueueTest.java
1a44d5dcabc18cd5ef111f732ccff91683a1a093 13-Jan-2010 Neal Nguyen <tommyn@google.com> Phase 2 of test cleanup: moving test files from AndroidTests closer to their sources.

Most of these are file moves; a couple notable exceptions are the changes due to the move, and fixing up test code:
- database/DatabaseCursorTest.java
- database/DatabaseStatementTest.java
- net/UriTest.java
/frameworks/base/core/tests/coretests/src/android/os/MessageQueueTest.java