Skip to content
Commit fab29c6f authored by JW Wang's avatar JW Wang
Browse files

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
parent f2e1609f
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