History log of /frameworks/base/core/java/android/os/Message.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9840c07667bb0363c93fb8459e6c08f7e30d5df1 12-Nov-2014 Jeff Brown <jeffbrown@google.com> Make Message.setAsynchronous() public.

There are many cases in real world applications where it is desirable
to continue processing messages on the Looper even when most other
messages have been suspended by a synchronization barrier pending
completion of the next drawing frame on vsync.

Internally the framework is able to mark certain messages as being
independent of these higher level synchronization invariants by
flagging them as asynchronous.

This change exposes the existing function and improves on the
documentation so that it is clearer what is meant by asynchronous.

Bug: 18283959
Change-Id: I775e4c95938123a364b21a9f2c39019bf37e1afd
/frameworks/base/core/java/android/os/Message.java
955d8d69ea6caabce1461dc25b339b9bf9dc61a6 08-Oct-2014 Dianne Hackborn <hackbod@google.com> Put in real "code" (aka marketing) name.

Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
/frameworks/base/core/java/android/os/Message.java
7895bc2e6309427937ab060031bfee5c99879d59 06-Sep-2014 Dianne Hackborn <hackbod@google.com> Fix issue #17391969: Only exception on Message.recycle() when target-sdk > 20

Change-Id: Iaf271c96901c5dba15831681269a49ad4aaa57fd
/frameworks/base/core/java/android/os/Message.java
1a20216bb27900475aa05434de21ab54f391ce55 05-Jul-2014 Nick Kralevich <nnk@google.com> am 3e5f0229: am 58005ec5: am 3b345a6f: Merge "Fix javadoc typo in Message.java: "arg1" -> "arg2""

* commit '3e5f0229e10be4179f763efd6119b63bcea6d162':
Fix javadoc typo in Message.java: "arg1" -> "arg2"
cb3ed1dc287ddb9beb7c9186713426f5fba263c3 28-Jun-2014 Dianne Hackborn <hackbod@google.com> Add new sendingUid field to Message.

This tell you where the message came from when it was
delivered through a Messenger.

Change-Id: I86a5f521c8ae919b45872dd76b61e83447f397ab
/frameworks/base/core/java/android/os/Message.java
d0eb55360fb94faa632cf65f246260827dc4a177 18-Jun-2014 Denver Coneybeare <denver@sleepydragon.org> Fix javadoc typo in Message.java: "arg1" -> "arg2"

Change-Id: I245eadaf322dce9e27af30d8dbb6d97ca0d296ce
/frameworks/base/core/java/android/os/Message.java
9867ed7aa98f5a719db4b50c39a290bc0ef38123 28-Feb-2014 Jeff Brown <jeffbrown@google.com> Detect invalid uses of Message.

Throw an exception when an application attempts to recycle or
resend messages that are still in-use.

Change-Id: I7096e8b7bd5bec41b7b8ef0c798c55ce3db6827e
/frameworks/base/core/java/android/os/Message.java
5182c780a8b42acd46a06d693ab63a0dd78c6d70 16-Oct-2013 Jeff Brown <jeffbrown@google.com> Log view root, input and looper state in bug reports.

Bug: 10948648
Change-Id: I956cce2a0fb516c02f9bbbc021f6238bcb226891
/frameworks/base/core/java/android/os/Message.java
a2ad65692481510496e367b593facf778f49249b 07-May-2012 Romain Guy <romainguy@google.com> Increase the Message pool size

Change-Id: If609c9ffbea800ff6409b0096a82f0b899f29343
/frameworks/base/core/java/android/os/Message.java
8f3b8e32993d190a26c70c839a63d8ce4c3b16d9 28-Mar-2012 Romain Guy <romainguy@google.com> Allow fine-grained control over functors execution

Adds non-drawing execution mode

Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
/frameworks/base/core/java/android/os/Message.java
e799cb78b4be61d3882e71c6812fa62c9a83fd5d 14-Feb-2012 Jeff Brown <jeffbrown@google.com> Add a barrier mechanism to the MessageQueue.

The synchronization barrier enables selectively blocking
execution of synchronous messages until the barrier is released.
Asynchronous messages may continue running in the meantime.

The barrier is intended to be used to implement more sophisticated
scheduling policies related to view hierarchy traversals. While
traversals are pending, most messages posted to the message queue
must be held up. This is to satisfy the invariant that traversals
will occur before subsequently posted messages are handled.

The exception to this rule are "asynchronous" messages that represent
external events or interrupts that come from other components such
as VSYNC pulses, input events or sensor events. Because these messages
are typically delivered at arbitrary times, they are independent of
traversals or other typical synchronization boundaries.

Messages can now be flagged as asynchronous to indicate that they
are weakly ordered.

Bug: 5721047
Change-Id: I1446dcfbc896f33b48355adc28967ace8c8c9b9b
/frameworks/base/core/java/android/os/Message.java
fc9ff4c834c5b3a3c4b024b89375d6c329092791 11-Jun-2011 Jeff Brown <jeffbrown@google.com> Always clear the Message when recycled.

Clear the Message when it is recycled, even if it will not go
back into the Message pool. This makes the behavior of recycle()
more consistent and ensures that the Message does not hold onto
other object after it has been recycled (useful in case there are
stale references to the Message lingering elsewhere).

Change-Id: I26b6a4b629f9c0b6bed70fdc42734919f30e64c4
/frameworks/base/core/java/android/os/Message.java
47864180918702768d26f48ec3213c935cea0c4b 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 6af61b84: am a206efcf: Merge "android.os.Message: respect sPoolSize"

* commit '6af61b843511bc5b669d30b980c4a9e2682da47c':
android.os.Message: respect sPoolSize
2405c278ef51ac527bca6d76a0b9d4804f9aab17 25-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> android.os.Message: respect sPoolSize

Also rename some static members from mFoo to sFoo.

Bug: http://code.google.com/p/android/issues/detail?id=13866
Change-Id: I5c5075eb6f529d1534c7aa72b6881873cd08676a
/frameworks/base/core/java/android/os/Message.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/java/android/os/Message.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/java/android/os/Message.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/java/android/os/Message.java
1ebccf531d1049853b3b0630035434619682c016 15-Aug-2010 Dianne Hackborn <hackbod@google.com> Fix problems with determining when to kill apps for wake usage.

Also improve debug printing of various times.

Change-Id: Ifcc288fd1bcbf44c069875ba97925b9e7ffe9a48
/frameworks/base/core/java/android/os/Message.java
75288fa1a4ee4886959af7243995d8afd9c3c905 17-Feb-2010 Dianne Hackborn <hackbod@google.com> Improve Service documentation with some samples.

Also some small tweaks to the Message API to improve its
use in the MessengerService sample.
/frameworks/base/core/java/android/os/Message.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Message.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Message.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/os/Message.java