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

Commit 752877e8 authored by Ruslan Tkhakokhov's avatar Ruslan Tkhakokhov
Browse files

Revert "Don't check allowBackup in PackageManager"

This reverts commit 0c098c47.

Reason for revert: Broken test (b/166767190)

Change-Id: I5a9c7be8f317f07413c1197ac7dc7d762ee98eb4
parent 0c098c47
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -14541,11 +14541,13 @@ public class PackageManagerService extends IPackageManager.Stub
            Log.v(TAG, "restoreAndPostInstall userId=" + userId + " package=" + res.pkg);
            Log.v(TAG, "restoreAndPostInstall userId=" + userId + " package=" + res.pkg);
        }
        }
        // A restore should be requested at this point if (a) the install
        // A restore should be performed at this point if (a) the install
        // succeeded, (b) the operation is not an update.
        // succeeded, (b) the operation is not an update, and (c) the new
        // package has not opted out of backup participation.
        final boolean update = res.removedInfo != null
        final boolean update = res.removedInfo != null
                && res.removedInfo.removedPackage != null;
                && res.removedInfo.removedPackage != null;
        boolean doRestore = !update;
        boolean allowBackup = res.pkg != null && res.pkg.isAllowBackup();
        boolean doRestore = !update && allowBackup;
        // Set up the post-install work request bookkeeping.  This will be used
        // Set up the post-install work request bookkeeping.  This will be used
        // and cleaned up by the post-install event handling regardless of whether
        // and cleaned up by the post-install event handling regardless of whether