ModesDndTile: Drop usages of runBlocking
- This CL refactors ModesDndTile to drop use of runBlocking. Previously, runBlocking was used to call userActionInteractor's handleClick() 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 this coroutine is managed by the lifecycle of the Tile. Bug: 423462317 Flag: com.android.systemui.do_not_use_run_blocking Test: atest ModesDndTileTest Change-Id: I317e6d4c82e0f62296a00b7ca965bf051e248beb
Loading
Please register or sign in to comment