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

Commit 22192ada authored by Christopher Tate's avatar Christopher Tate
Browse files

Correctly parse previous PMBA state during backup

Bug 18628030

Change-Id: Iefa23de50dd9e1b27cfa5d887f117876d57e4083
parent 6dfa60f3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ public class PackageManagerBackupAgent extends BackupAgent {
            // OR 3. it looks like we use the same home app + version as before, but
            //       the signatures don't match so we treat them as different apps.
            final boolean needHomeBackup = (homeVersion != mStoredHomeVersion)
                    || Objects.equals(home, mStoredHomeComponent)
                    || !Objects.equals(home, mStoredHomeComponent)
                    || (home != null
                        && !BackupManagerService.signaturesMatch(mStoredHomeSigHashes, homeInfo));
            if (needHomeBackup) {
@@ -534,6 +534,7 @@ public class PackageManagerBackupAgent extends BackupAgent {
                            + ", redoing from start");
                    return;
                }
                pkg = in.readUTF();
            } else {
                // This is an older version of the state file in which the lead element
                // is not a STATE_FILE_VERSION string.  If that's the case, we want to