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

Skip to content
Commit c6a7585c authored by Michael Hoogasian's avatar Michael Hoogasian Committed by Han Wang
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 03a8f7ac
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