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.
This commit is contained in:
@@ -120,7 +120,10 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
|||||||
// write its signature block to the output, keyed on the package name.
|
// write its signature block to the output, keyed on the package name.
|
||||||
for (PackageInfo pkg : mAllPackages) {
|
for (PackageInfo pkg : mAllPackages) {
|
||||||
String packName = pkg.packageName;
|
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
|
// We haven't stored this app's signatures yet, so we do that now
|
||||||
try {
|
try {
|
||||||
PackageInfo info = mPackageManager.getPackageInfo(packName,
|
PackageInfo info = mPackageManager.getPackageInfo(packName,
|
||||||
|
|||||||
Reference in New Issue
Block a user