Skip to content
Commit f1154511 authored by Gavin Corkery's avatar Gavin Corkery
Browse files

Block until userdata backup/restore has taken place

Currently, userdata backup/restore is performed on a handler thread.
This means that we cannot guarantee that an application will not begin
running during a backup/restore, as we have no guarantees of when
the backup logic will actually execute.

In the onUnlockUser case we can block until the handler thread has
completed its work by using a CountdownLatch. In the general case we
will keep
snapshotAndRestoreUserData on the handler thread, using Package
Manager's token to decide when to unfreeze

Test: atest RollbackTest
Test: atest StagedRollbackTest
Bug: 124032231
Change-Id: I4c818833e48a549e8a3aa8401539f44c14b89b57
parent 2c833c2b
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