Skip to content
Commit be9f42d8 authored by Michael Hoogasian's avatar Michael Hoogasian
Browse files

Prevent HandlerThread from losing interrupted flag



I spent forever trying to figure out why one of my threads was losing its
interrupted flag, and eventually chased the problem to this. This change
keeps the behavior of blocking until the looper is intialized (i.e, any
InterruptedExceptions are still eaten), BUT it will restore the thread's
interrupted flag before returning, if needed.

Test: calling getLooper() from a thread with the interrupted flag set, then
verifying that the interrupted flag was still set after the call returned.

Change-Id: If1b1a0812fa672c02510b70faf4d813b82ae8589
Signed-off-by: default avatarMichael Hoogasian <michael.hoogasian@gmail.com>
parent 2a9c3e49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment