Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfb33b86 authored by Christopher Tate's avatar Christopher Tate Committed by Android Git Automerger
Browse files

am fcfc99c0: am f7918b4a: am d3a57029: am 1b0c9c95: am 81c1d8d3: Ensure...

am fcfc99c0: am f7918b4a: am d3a57029: am 1b0c9c95: am 81c1d8d3: Ensure install-during-restore is like install-then-restore

* commit 'fcfc99c0':
  Ensure install-during-restore is like install-then-restore
parents e34ecc9a fcfc99c0
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -3591,7 +3591,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;