Loading services/core/java/com/android/server/pm/InstallPackageHelper.java +8 −1 Original line number Diff line number Diff line Loading @@ -2194,12 +2194,19 @@ final class InstallPackageHelper { final String installerPackageName = installRequest.getInstallerPackageName(); if (DEBUG_INSTALL) Slog.d(TAG, "New package installed in " + pkg.getPath()); final int userId = installRequest.getUserId(); if (userId != UserHandle.USER_ALL && userId != UserHandle.USER_CURRENT && !mPm.mUserManager.exists(userId)) { installRequest.setError(PackageManagerException.ofInternalError( "User " + userId + " doesn't exist or has been removed", PackageManagerException.INTERNAL_ERROR_MISSING_USER)); return; } synchronized (mPm.mLock) { // For system-bundled packages, we assume that installing an upgraded version // of the package implies that the user actually wants to run that new code, // so we enable the package. final PackageSetting ps = mPm.mSettings.getPackageLPr(pkgName); final int userId = installRequest.getUserId(); if (ps != null) { if (ps.isSystem()) { if (DEBUG_INSTALL) { Loading services/core/java/com/android/server/pm/PackageManagerException.java +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ public class PackageManagerException extends Exception { public static final int INTERNAL_ERROR_STATIC_SHARED_LIB_OVERLAY_TARGETS = -35; public static final int INTERNAL_ERROR_APEX_NOT_DIRECTORY = -36; public static final int INTERNAL_ERROR_APEX_MORE_THAN_ONE_FILE = -37; public static final int INTERNAL_ERROR_MISSING_USER = -38; @IntDef(prefix = { "INTERNAL_ERROR_" }, value = { INTERNAL_ERROR_NATIVE_LIBRARY_COPY, Loading Loading
services/core/java/com/android/server/pm/InstallPackageHelper.java +8 −1 Original line number Diff line number Diff line Loading @@ -2194,12 +2194,19 @@ final class InstallPackageHelper { final String installerPackageName = installRequest.getInstallerPackageName(); if (DEBUG_INSTALL) Slog.d(TAG, "New package installed in " + pkg.getPath()); final int userId = installRequest.getUserId(); if (userId != UserHandle.USER_ALL && userId != UserHandle.USER_CURRENT && !mPm.mUserManager.exists(userId)) { installRequest.setError(PackageManagerException.ofInternalError( "User " + userId + " doesn't exist or has been removed", PackageManagerException.INTERNAL_ERROR_MISSING_USER)); return; } synchronized (mPm.mLock) { // For system-bundled packages, we assume that installing an upgraded version // of the package implies that the user actually wants to run that new code, // so we enable the package. final PackageSetting ps = mPm.mSettings.getPackageLPr(pkgName); final int userId = installRequest.getUserId(); if (ps != null) { if (ps.isSystem()) { if (DEBUG_INSTALL) { Loading
services/core/java/com/android/server/pm/PackageManagerException.java +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ public class PackageManagerException extends Exception { public static final int INTERNAL_ERROR_STATIC_SHARED_LIB_OVERLAY_TARGETS = -35; public static final int INTERNAL_ERROR_APEX_NOT_DIRECTORY = -36; public static final int INTERNAL_ERROR_APEX_MORE_THAN_ONE_FILE = -37; public static final int INTERNAL_ERROR_MISSING_USER = -38; @IntDef(prefix = { "INTERNAL_ERROR_" }, value = { INTERNAL_ERROR_NATIVE_LIBRARY_COPY, Loading