Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b22903f8 authored by Kshitij Gupta's avatar Kshitij Gupta
Browse files

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
parent 6517fbf0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment