summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2013-05-06 15:00:53 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-06 15:00:53 -0700
commitf7918b4a1e06350ba4d69fe47327db830cd4e8ba (patch)
treed4a04466181069e355bbd8ca1ca300150706623f /services
parentc3a7ea424d96aac02762ab6819429e3fa52d9a25 (diff)
parentd3a57029e80073aa3c7dfe1dbc8945d32968f6ae (diff)
downloadframeworks_base-f7918b4a1e06350ba4d69fe47327db830cd4e8ba.zip
frameworks_base-f7918b4a1e06350ba4d69fe47327db830cd4e8ba.tar.gz
frameworks_base-f7918b4a1e06350ba4d69fe47327db830cd4e8ba.tar.bz2
am d3a57029: am 1b0c9c95: am 81c1d8d3: Ensure install-during-restore is like install-then-restore
* commit 'd3a57029e80073aa3c7dfe1dbc8945d32968f6ae': Ensure install-during-restore is like install-then-restore
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/BackupManagerService.java11
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 7ac314b..6044eed8 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -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;