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

Commit 4ea283a0 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Sanity-check existence of restore agent" into jb-mr1-dev

parents be6024d5 e7287a07
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -4401,6 +4401,18 @@ class BackupManagerService extends IBackupManager.Stub {
                    return;
                }

                if (packageInfo.applicationInfo.backupAgentName == null
                        || "".equals(packageInfo.applicationInfo.backupAgentName)) {
                    if (DEBUG) {
                        Slog.i(TAG, "Data exists for package " + packageName
                                + " but app has no agent; skipping");
                    }
                    EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
                            "Package has no agent");
                    executeNextState(RestoreState.RUNNING_QUEUE);
                    return;
                }

                if (metaInfo.versionCode > packageInfo.versionCode) {
                    // Data is from a "newer" version of the app than we have currently
                    // installed.  If the app has not declared that it is prepared to