KeyguardPreviewRenderer: Drop usages of runBlocking
- This CL refactors KeyguardPreviewRenderer to eliminate runBlocking usage for `SurfaceControlViewHost` creation, using Handler.post instead - Previously, the SurfaceControlViewHost was created within a runBlocking block on the main dispatcher. This blocks the calling thread, potentially causing UI jank or ANRs during Keyguard preview initialization. - SurfaceControlViewHost creation and its disposal logic are now posted to the mainHandler. This allows the operation to be scheduled on the main thread's message queue, executing asynchronously without blocking the initiating thread. The class member "host" is now lateinit to accommodate its deferred initialization. Bug: 423462317 Flag: com.android.systemui.do_not_use_run_blocking Change-Id: Ic93c30d0af2ed5067711de2e7bca984d05ce3d5d
Loading
Please register or sign in to comment