Skip to content
Commit 416a04e4 authored by Hai Zhang's avatar Hai Zhang
Browse files

Fix permission state missing when backup is restored.

The BackupAgent of an application may run before package post
installation, so the permission state must be ready by then. So
instead of calling onPackageInstalled() in post install, we can revert
to calling it in updateSettingsInternalLI() as in R (before
ag/13144022 which introduced the regression).

This changes the grant permissions etc to be done before package
post-installation, but this might be actually a correct change as
application code may expect permissions, and we are already doing it
like this in installExistingPackageAsUser() so this change is making
it consistent.

Fixes: 175932103
Test: manual
Test: Wipe and restore a backup and ensure Keep is no longer crashing.
Test: presubmit
Change-Id: Ie2e0dbd7a1a8454f9935527b9c303c26010ff592
parent fdcfd2a2
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