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

Skip to content
Commit c88bdf8a authored by Ruslan Tkhakokhov's avatar Ruslan Tkhakokhov
Browse files

Offload teardown logic after BackupAgent crash to a worker thread

Teardown logic introduced in ag/16247901 is called on a foreground
thread in ActvitiyManager. The teardown itself might be time-consuming,
causing system_server to crash due to a blocked foreground thread (see
linked bug for more context).

This CL limits the scope of the fix to just the new logic that caused
the regression. Follow-up improvements should be made to ensure
time-consuming operations don't block foreground threads in the future
(b/242307900 will track).

Fixes: 213860448
Test: 1. atest UserBackupManagerServiceTest
      2. atest CtsBackupTestCases
      3. Kill app during full backup -> ensure agent is properly torn
	 down.
      4. Modify BackupTransport::cancelFullBackup() impl. to block; kill
	 app during full backup -> ensure foreground thread is not
	 blocked and agent is still properly torn down.
Change-Id: I6c1cb1ff71814564d5884a362135edfad3b258f2
parent e58df67a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment