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

Commit 65989857 authored by Christopher Tate's avatar Christopher Tate Committed by Android Git Automerger
Browse files

am ef76d6a4: Merge "Handle single-package restores properly" into lmp-dev

* commit 'ef76d6a48709a99f6e49c0c2100ba2e0c4a083dd':
  Handle single-package restores properly
parents 2f9b1b95 403f095c
Loading
Loading
Loading
Loading
+48 −41
Original line number Diff line number Diff line
@@ -6409,10 +6409,16 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
            mIsSystemRestore = isFullSystemRestore;
            mFinished = false;

            if (targetPackage != null) {
                // Single package restore
                mAcceptSet = new ArrayList<PackageInfo>();
                mAcceptSet.add(targetPackage);
            } else {
                // Everything possible, or a target set
                if (filterSet == null) {
                    // We want everything and a pony
                List<PackageInfo> apps
                        = PackageManagerBackupAgent.getStorableApplications(mPackageManager);
                    List<PackageInfo> apps =
                            PackageManagerBackupAgent.getStorableApplications(mPackageManager);
                    filterSet = packagesToNames(apps);
                    if (DEBUG) {
                        Slog.i(TAG, "Full restore; asking for " + filterSet.length + " apps");
@@ -6459,6 +6465,7 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
                        // this one is always valid too
                    }
                }
            }

            if (MORE_DEBUG) {
                Slog.v(TAG, "Restore; accept set size is " + mAcceptSet.size());