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

Commit f087272d authored by Christopher Tate's avatar Christopher Tate
Browse files

Start respecting the auto-restore-at-install setting

Change-Id: I420ff6b4ba72f87bee56f45d8906f086f7a2b114
parent 277903f8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2289,7 +2289,7 @@ class BackupManagerService extends IBackupManager.Stub {
        if (DEBUG) Log.v(TAG, "restoreAtInstall pkg=" + packageName
                + " token=" + Integer.toHexString(token));

        if (restoreSet != 0) {
        if (mAutoRestore && mProvisioned && restoreSet != 0) {
            // okay, we're going to attempt a restore of this package from this restore set.
            // The eventual message back into the Package Manager to run the post-install
            // steps for 'token' will be issued from the restore handling code.
@@ -2306,8 +2306,8 @@ class BackupManagerService extends IBackupManager.Stub {
                    restoreSet, pkg, token);
            mBackupHandler.sendMessage(msg);
        } else {
            // No way to attempt a restore; just tell the Package Manager to proceed
            // with the post-install handling for this package.
            // Auto-restore disabled or no way to attempt a restore; just tell the Package
            // Manager to proceed with the post-install handling for this package.
            if (DEBUG) Log.v(TAG, "No restore set -- skipping restore");
            try {
                mPackageManagerBinder.finishPackageInstall(token);
@@ -2484,6 +2484,7 @@ class BackupManagerService extends IBackupManager.Stub {
            pw.println("Backup Manager is " + (mEnabled ? "enabled" : "disabled")
                    + " / " + (!mProvisioned ? "not " : "") + "provisioned / "
                    + (this.mPendingInits.size() == 0 ? "not " : "") + "pending init");
            pw.println("Auto-restore is " + (mAutoRestore : "enabled" : "disabled"));
            pw.println("Last backup pass: " + mLastBackupPass
                    + " (now = " + System.currentTimeMillis() + ')');
            pw.println("  next scheduled: " + mNextBackupPass);