Skip to content
Commit 0c098c47 authored by Ruslan Tkhakokhov's avatar Ruslan Tkhakokhov
Browse files

Don't check allowBackup in PackageManager

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. Manual: Run restore at install for packages with
      allowBackup=true/false and verify the flag is respected.
Change-Id: I6ca61869129f5fabd40c01cd314cbf0f15e1f7fc
parent d72af5ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment