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

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

UserRepository: Drop usages of runBlocking

- This CL makes the initialization of _userSwitcherSettings
  non-blocking. Previously, the initialValue for the StateFlow
  was retrieved using `runBlocking { getSettings() }`. While
  functional, runBlocking will block the current thread until the
  suspending getSettings() call completes.
- The `onStart { emit(Unit) }` operator ensures that getSettings()
  is still executed immediately and asynchronously, pushing the
  actual settings to the StateFlow shortly after.

Bug: 423462317
Flag: com.android.systemui.do_not_use_run_blocking
Test: atest UserRepositoryImplTest
Change-Id: Ib90302ac3bed8e0067031bbf18b43b0eca06eafd
parent 6390672c
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