Revert^4 "Removing all restored backups except one so we don't have old backups"

To prevent the error I introduce the method restorePreviousState().

This reverts commit 1234090589be2f8b99284737be23113c19fd0239.

Reason for revert: Fixing presubmit breaks

Bug: 325285743
Flag:  ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I63666c29eb91dada4243af019ab0538c40bc0f78
8 files changed