commit | 97d28b3dfa73a56e893031212eae37567f17ebfb | [log] [tgz] |
---|---|---|
author | Remi NGUYEN VAN <reminv@google.com> | Mon Jan 29 20:03:27 2024 +0900 |
committer | Remi NGUYEN VAN <reminv@google.com> | Thu Feb 01 11:56:32 2024 +0900 |
tree | ba11e61e1ee6bef89a9026c080821d43b88298b5 | |
parent | 96361bc4cdf3806848828aee564adbc83a2c4872 [diff] |
Do not block for HandlerThread start Instead of calling HandlerThread#getLooper immediately after starting it, do it asynchronously in onLooperPrepared. getLooper blocks until the looper is ready, which may take a significant amount of time. This involves queueing tasks until the looper is ready, so the thread selection logic is refactored to a dedicated class. Test: atest Change-Id: I0444bffe8e4bb4e3f29bd0271c7b24bc46a62cf6