diff options
author | Christopher Tate <ctate@google.com> | 2013-05-06 14:53:10 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-06 14:53:10 -0700 |
commit | 1b0c9c95dc72ebeb8af73bc3ff44c313ebd788f4 (patch) | |
tree | 0769f467def094825ae12f420fc30c8c95619488 | |
parent | f3a5323cc685fd78e7c4a7d7474b79cd34a4cf52 (diff) | |
parent | 81c1d8d3a5aef6a423f0bb02de1b362b2f2d12df (diff) | |
download | frameworks_base-1b0c9c95dc72ebeb8af73bc3ff44c313ebd788f4.zip frameworks_base-1b0c9c95dc72ebeb8af73bc3ff44c313ebd788f4.tar.gz frameworks_base-1b0c9c95dc72ebeb8af73bc3ff44c313ebd788f4.tar.bz2 |
am 81c1d8d3: Ensure install-during-restore is like install-then-restore
* commit '81c1d8d3a5aef6a423f0bb02de1b362b2f2d12df':
Ensure install-during-restore is like install-then-restore
-rw-r--r-- | services/java/com/android/server/BackupManagerService.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java index 1f3f172..5fff8fd 100644 --- a/services/java/com/android/server/BackupManagerService.java +++ b/services/java/com/android/server/BackupManagerService.java @@ -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; |