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

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

am 9422b47d: am 8b9f6619: am ef76d6a4: Merge "Handle single-package restores properly" into lmp-dev

* commit '9422b47db61fed874885bd70a319793384cc6d4c':
  Handle single-package restores properly
parents e887756e a5e44a8c
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());