ModesTile: Drop usages of runBlocking
- This CL refactors ModesTile to drop use of runBlocking. Previously, runBlocking was used to call userActionInteractor's handleClick() and handleToggleClick() method which could take up time and block the main thread. - We now do this asynchronously via lifecycleScope. While lifecycleScope also uses the main thread internally, we do not block the main thread anymore. Additionally, the life of these coroutines is managed by the lifecycle of the Tile. Bug: 423462317 Flag: com.android.systemui.do_not_use_run_blocking Test: atest ModesTileTest Change-Id: Ie1885a93660e7728f17dcd60161b12c691f6531f
Loading
Please register or sign in to comment