summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2009-06-29 18:52:55 -0700
committerChristopher Tate <ctate@google.com>2009-06-29 18:52:55 -0700
commit6f317426e49e73ef3e50d8839877504039cd2fca (patch)
treed80ff010d9887a32166d661e9397a9535d62a3c0
parentbbd63cb28595bd6b1fa62d331d9373b5c798c267 (diff)
downloadframeworks_base-6f317426e49e73ef3e50d8839877504039cd2fca.zip
frameworks_base-6f317426e49e73ef3e50d8839877504039cd2fca.tar.gz
frameworks_base-6f317426e49e73ef3e50d8839877504039cd2fca.tar.bz2
Don't issue a deletion for the global metadata backup
We were accidentally submitting a deletion for the global metadata key in the PM backup handling (it was falling into the usual "here's a package that we said we'd backed up last time, but now it's no longer on device" code). Don't do that any more, i.e. actually keep the global metadata key in the backup set. Oops.
-rw-r--r--services/java/com/android/server/PackageManagerBackupAgent.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/java/com/android/server/PackageManagerBackupAgent.java b/services/java/com/android/server/PackageManagerBackupAgent.java
index 66fb86d..16f14e8 100644
--- a/services/java/com/android/server/PackageManagerBackupAgent.java
+++ b/services/java/com/android/server/PackageManagerBackupAgent.java
@@ -120,7 +120,10 @@ public class PackageManagerBackupAgent extends BackupAgent {
// write its signature block to the output, keyed on the package name.
for (PackageInfo pkg : mAllPackages) {
String packName = pkg.packageName;
- if (!existing.contains(packName)) {
+ if (packName.equals(GLOBAL_METADATA_KEY)) {
+ // We've already handled the metadata key; skip it here
+ continue;
+ } else if (!existing.contains(packName)) {
// We haven't stored this app's signatures yet, so we do that now
try {
PackageInfo info = mPackageManager.getPackageInfo(packName,