Reverify certain conditions during staged install

There is a delay between when a staged session is verified and when it
gets installed. The device state can mutate within this delay. As such
we need to reverify certain conditions during install phase.

For example, suppose we have a staged session for package X_v1 and it
passes pre-reboot verification. But before we reboot, if install X_v2
using non-staged install flow. On reboot, when installing X_v1 we need
to check for downgrade once again.

Bug: 163037460
Test: atest StagedInstallTest#testInstallMultipleStagedSession_PartialFail_ApkOnly
Change-Id: Ib9dd6eb6787ba8875644fa51919bc9010600509a
1 file changed