am 81c1d8d3
: Ensure install-during-restore is like install-then-restore
* commit '81c1d8d3a5aef6a423f0bb02de1b362b2f2d12df': Ensure install-during-restore is like install-then-restore
This commit is contained in:
@ -3583,7 +3583,16 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
} else {
|
||||
// So far so good -- do the signatures match the manifest?
|
||||
Signature[] sigs = mManifestSignatures.get(info.packageName);
|
||||
if (!signaturesMatch(sigs, pkg)) {
|
||||
if (signaturesMatch(sigs, pkg)) {
|
||||
// If this is a system-uid app without a declared backup agent,
|
||||
// don't restore any of the file data.
|
||||
if ((pkg.applicationInfo.uid < Process.FIRST_APPLICATION_UID)
|
||||
&& (pkg.applicationInfo.backupAgentName == null)) {
|
||||
Slog.w(TAG, "Installed app " + info.packageName
|
||||
+ " has restricted uid and no agent");
|
||||
okay = false;
|
||||
}
|
||||
} else {
|
||||
Slog.w(TAG, "Installed app " + info.packageName
|
||||
+ " signatures do not match restore manifest");
|
||||
okay = false;
|
||||
|
Reference in New Issue
Block a user