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

Commit 62b193ca authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Don't remove temporary missing package's user data.

If a package was installed on SD card, we don't want to remove it's user
data when SD card is removed.

Bug: 211944048
Test: presubmit
Change-Id: I440906ccb9ce8b3e510a25c6c2f51bff1e001658
parent 4812c710
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -476,16 +476,12 @@ final class AppDataHelper {
            } else if (!ps.getInstalled(userId)) {
                throw new PackageManagerException(
                        "Package " + packageName + " not installed for user " + userId);
            } else if (ps.getPkg() == null) {
                throw new PackageManagerException("Package " + packageName + " is not parsed yet");
            } else {
                if (!shouldHaveAppStorage(ps.getPkg())) {
            } else if (ps.getPkg() != null && !shouldHaveAppStorage(ps.getPkg())) {
                throw new PackageManagerException(
                        "Package " + packageName + " shouldn't have storage");
            }
        }
    }
    }

    @GuardedBy("mPm.mLock")
    private String normalizePackageNameLPr(String packageName) {