Squash runnables in onBootCompleted (1/n)

Some code clean-up to makes it easier to register
OnPropertiesChangedListener there in the next patch.

Bug: 147712943
Test: atest StagedRollbackTest RollbackTest
Change-Id: I46d08fe2715b7c6a08d9a6d862dc0ab0dd3de12c
This commit is contained in:
JW Wang
2020-01-15 15:30:49 +08:00
parent b85c3a8f88
commit 3a85019ce4

View File

@@ -511,11 +511,10 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub {
@AnyThread
void onBootCompleted() {
getHandler().post(() -> updateRollbackLifetimeDurationInMillis());
// Also posts to handler thread
scheduleExpiration(0);
getHandler().post(() -> {
updateRollbackLifetimeDurationInMillis();
runExpiration();
// Check to see if any rollback-enabled staged sessions or staged
// rollback sessions been applied.
List<Rollback> enabling = new ArrayList<>();