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
Loading
Please register or sign in to comment