Merge "[pm] fail install-existing for apps deleted with KEEP_DATA" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5d8b0d27bf
@@ -453,6 +453,7 @@ final class DeletePackageHelper {
|
||||
// We need to set it back to 'installed' so the uninstall
|
||||
// broadcasts will be sent correctly.
|
||||
if (DEBUG_REMOVE) Slog.d(TAG, "Not installed by other users, full delete");
|
||||
ps.setPkg(null);
|
||||
ps.setInstalled(true, userId);
|
||||
mPm.mSettings.writeKernelMappingLPr(ps);
|
||||
clearPackageStateAndReturn = false;
|
||||
|
||||
@@ -654,7 +654,7 @@ final class InstallPackageHelper {
|
||||
synchronized (mPm.mLock) {
|
||||
final Computer snapshot = mPm.snapshotComputer();
|
||||
pkgSetting = mPm.mSettings.getPackageLPr(packageName);
|
||||
if (pkgSetting == null) {
|
||||
if (pkgSetting == null || pkgSetting.getPkg() == null) {
|
||||
return PackageManager.INSTALL_FAILED_INVALID_URI;
|
||||
}
|
||||
if (!snapshot.canViewInstantApps(callingUid, UserHandle.getUserId(callingUid))) {
|
||||
|
||||
Reference in New Issue
Block a user