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

Commit cb71f42d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Doc updates for Looper/HandlerThread to mention that quit/quitSafely...

Merge "Doc updates for Looper/HandlerThread to mention that quit/quitSafely are noops on subsequent calls" into main
parents 94d547df 66accd5b
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -153,6 +153,9 @@ public class HandlerThread extends Thread {
     * </p><p>
     * Any attempt to post messages to the queue after the looper is asked to quit will fail.
     * For example, the {@link Handler#sendMessage(Message)} method will return false.
     * </p><p>
     * If {@link #quit} or {@link #quitSafely} is called multiple times, the first call
     * will have an effect and the subsequent calls will be no-ops.
     * </p><p class="note">
     * Using this method may be unsafe because some messages may not be delivered
     * before the looper terminates.  Consider using {@link #quitSafely} instead to ensure
@@ -186,6 +189,9 @@ public class HandlerThread extends Thread {
     * If the thread has not been started or has finished (that is if
     * {@link #getLooper} returns null), then false is returned.
     * Otherwise the looper is asked to quit and true is returned.
     * </p><p>
     * If {@link #quit} or {@link #quitSafely} is called multiple times, the first call
     * will have an effect and the subsequent calls will be no-ops.
     * </p>
     *
     * @return True if the looper looper has been asked to quit or false if the
+6 −0
Original line number Diff line number Diff line
@@ -491,6 +491,9 @@ public final class Looper {
     * </p><p>
     * Any attempt to post messages to the queue after the looper is asked to quit will fail.
     * For example, the {@link Handler#sendMessage(Message)} method will return false.
     * </p><p>
     * If {@link #quit} or {@link #quitSafely} is called multiple times, the first call
     * will have an effect and the subsequent calls will be no-ops.
     * </p><p class="note">
     * Using this method may be unsafe because some messages may not be delivered
     * before the looper terminates.  Consider using {@link #quitSafely} instead to ensure
@@ -513,6 +516,9 @@ public final class Looper {
     * </p><p>
     * Any attempt to post messages to the queue after the looper is asked to quit will fail.
     * For example, the {@link Handler#sendMessage(Message)} method will return false.
     * </p><p>
     * If {@link #quit} or {@link #quitSafely} is called multiple times, the first call
     * will have an effect and the subsequent calls will be no-ops.
     * </p>
     */
    public void quitSafely() {