Avoid installing apex sessions when not in fs-checkpoint mode
On devices that support fs-checkpoint, changes made to /data outside of
fs-checkpoint mode are not reverted. As such, apexd should not install
apex sessions when device is not in fs-checkpoint mode, i.e, when
needsCheckpoint is false in vold.
Such situation can happen if the device reboots more than 2 times in
quick succession, such that both needsCheckpoint and needsRollback is
false in vold. Without this fix, we will end up activating the apex
in sessions and there won't be any way to revert those change.
Bug: 193648282
Test: atest ApexTestCases:ApexActivationFailureTests
Change-Id: Ib24a48b7b0f5125f86f77e6ceb7bba0e63251d71
2 files changed