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
This commit is contained in:
@@ -476,13 +476,9 @@ 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())) {
|
||||
throw new PackageManagerException(
|
||||
"Package " + packageName + " shouldn't have storage");
|
||||
}
|
||||
} else if (ps.getPkg() != null && !shouldHaveAppStorage(ps.getPkg())) {
|
||||
throw new PackageManagerException(
|
||||
"Package " + packageName + " shouldn't have storage");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user