Check eligibility before calling snapshotAndRestoreUserData

In cases where a rollback is not being enabled or a downgrade
is not taking place, PackageManagerService needlessly calls
into RollbackManagerService, giving the impression that a
userdata backup/restore is taking place. Performing this
eligibility check should make the post-install flow clearer.

Test: atest RollbackTest
Bug: 139920268
Change-Id: I7ccea264aefa24df52751647f45f38df4ae15cf4
1 file changed