Don't check allowBackup in PackageManager
This change was first submitted in ag/12316667 and then reverted as it broke StagedInstallTest. The bug has now been fixed - we need to still check if the package != null before requesting restore for it. Below follows the original commit message. During restore at install, PackageManager checks the allowBackup flag for the package to determine whether or not to request a restore by calling BackupManager::restoreAtInstall(). The above check isn't needed because B&R code verifies package elibility before running backup / restore anyway. Furthermore, this check breaks device-to-device migrations where we ignore allowBackup flag: PackageManager doesn't know if the data is restored to the device from cloud or directrly transferred from another device. Remove the check altogether since it's not needed as described above. Bug: 160407842 Test: 1. atest PackageManagerServiceTest 2. atest StagedInstallTest 3. Manual: Run restore at install for packages with allowBackup=true/false and verify the flag is respected. Change-Id: I607fe96904663ccbe07f101eaea51d68a65785cf
Loading
Please register or sign in to comment