Improve TestLooperManager check on execute()
Looper.isCurrentThread() does exactly what we need. Checking the same condition via a side effect on Looper.myLooper() is harder to read. It's also less reliable, because I caught some (terrible) tests manipulating ThreadLocals. Bug: 379472827 Change-Id: Id67eddcb57329cb42b5b4ba6b09595ec720f6cdb Flag: android.os.message_queue_testability Test: android.os.cts.TestLooperManagerTest
Loading
Please register or sign in to comment