Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63e224f6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Clarify that `Message#what` is 0 unless otherwise set." into main am: 14a533a8

parents 137ea514 14a533a8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -798,6 +798,12 @@ public class Handler {
    /**
     * Remove any pending posts of messages with code 'what' that are in the
     * message queue.
     *
     * Note that `Message#what` is 0 unless otherwise set.
     * When calling `postMessage(Runnable)` or `postAtTime(Runnable, long)`,
     * the `Runnable` is internally wrapped with a `Message` whose `what` is 0.
     * Calling `removeMessages(0)` will remove all messages without a `what`,
     * including posted `Runnable`s.
     */
    public final void removeMessages(int what) {
        mQueue.removeMessages(this, what, null);
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ public final class Message implements Parcelable {
     * what this message is about. Each {@link Handler} has its own name-space
     * for message codes, so you do not need to worry about yours conflicting
     * with other handlers.
     *
     * If not specified, this value is 0.
     * Use values other than 0 to indicate custom message codes.
     */
    public int what;