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

Commit 99192e30 authored by Kshitij Gupta's avatar Kshitij Gupta
Browse files

CommunalBackup: Drop usages of runBlocking

- This commit refactors the Communal backup and restore mechanism to
  eliminate runBlocking calls where possible, leveraging asynchronous
  coroutines instead.
- Previously, CommunalBackupHelper and CommunalBackupUtils used
  runBlocking to retrieve the communal hub state. This approach forces
  the calling thread to block until the data is fetched from the
  database.
- performBackup now uses bgScope.launch to call the now-suspending
  getCommunalHubState() method on CommunalBackupUtils. This ensures
  the backup process runs asynchronously without blocking the
  BackupHelper thread.

Bug: 423462317
Flag: com.android.systemui.do_not_use_run_blocking
Test: atest CommunalBackupHelperTest CommunalBackupUtilsTest
Change-Id: I63200529aaf0f04a8f9f5b139d548ffb38f8f5a4
parent 41995c9d
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