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

Commit e2f5283f authored by Christopher Tate's avatar Christopher Tate Committed by android-build-merger
Browse files

Respect restoreAnyVersion=true in full-data restore path am: d990e4d3 am: f413e3f2

am: 182c65a4

Change-Id: I4af6eeb29fbef7384d9764b83a8642db6b3398ec
parents f2cee73d 182c65a4
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -6057,7 +6057,11 @@ public class BackupManagerService {
                                        // the app developer's cert, so they're different on every
                                        // device.
                                        if (signaturesMatch(sigs, pkgInfo)) {
                                            if (pkgInfo.versionCode >= version) {
                                            if ((pkgInfo.applicationInfo.flags
                                                    & ApplicationInfo.FLAG_RESTORE_ANY_VERSION) != 0) {
                                                Slog.i(TAG, "Package has restoreAnyVersion; taking data");
                                                policy = RestorePolicy.ACCEPT;
                                            } else if (pkgInfo.versionCode >= version) {
                                                Slog.i(TAG, "Sig + version match; taking data");
                                                policy = RestorePolicy.ACCEPT;
                                            } else {
@@ -7479,7 +7483,11 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
                                        // the app developer's cert, so they're different on every
                                        // device.
                                        if (signaturesMatch(sigs, pkgInfo)) {
                                            if (pkgInfo.versionCode >= version) {
                                            if ((pkgInfo.applicationInfo.flags
                                                    & ApplicationInfo.FLAG_RESTORE_ANY_VERSION) != 0) {
                                                Slog.i(TAG, "Package has restoreAnyVersion; taking data");
                                                policy = RestorePolicy.ACCEPT;
                                            } else if (pkgInfo.versionCode >= version) {
                                                Slog.i(TAG, "Sig + version match; taking data");
                                                policy = RestorePolicy.ACCEPT;
                                            } else {