Skip to content
Commit 4e554188 authored by Carmen Agimof's avatar Carmen Agimof
Browse files

Do not try to do a restore at install if the user is not ready for

backup.

Bug: 144155744

This solves a bug which makes staged installs hang. This is
happening because when installing, the PackageManager is waiting for a response to be sent back from
the BackupManagerService after it finishes restoring. In the case of staged installs which happen at boot,
isUserReadyForBackup is false, so the method does nothing and the
PackageManager keeps on waiting on a response.

Test: 1) atest RunBackupFrameworksServicesRoboTests and atest AutoRestoreHostSideTest
2) Manual:
   - Applied ag/9722795
   - run `atest com.android.tests.rollback.host.StagedRollbackTest#testStagedInstallHang`
   - The log file doesn't contain any "Watchdog: *** WATCHDOG KILLING SYSTEM PROCESS: Blocked in handler on main thread (main)".

Change-Id: I294c309b0c7e5a9e12bdbd0c3fc4946767f91cee
parent 49f933a7
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