Rewrite blockRollbackManager (1/n)

This is an effort to fix flaky testEnableRollbackTimeoutFailsRollback.

RollbackManager#blockRollbackManager doesn't work as intended because
PackageManagerService can't dispatch ENABLE_ROLLBACK_TIMEOUT until
abortBroadcast is called by RollbackManagerServiceImpl which happens
after blocking is finished.

See https://b.corp.google.com/issues/144732395#comment4 for a detailed
explanation.

blockRollbackManager is rewritten such that:
1. blocking takes effect only after ACTION_PACKAGE_ENABLE_ROLLBACK is
   received.
2. allows tests which involves multi-package install where multiple
   ACTION_PACKAGE_ENABLE_ROLLBACK will be broadcasted.
3. ENABLE_ROLLBACK_TIMEOUT now will be dispatched without waiting for
   blocking to finish.

Bug: 144732395
Test: atest RollbackTest
Change-Id: Ib262bc8c8f17563a4911f780c9d2e6a34803335a
1 file changed