Loading services/core/java/com/android/server/pm/ComputerEngine.java +3 −3 Original line number Diff line number Diff line Loading @@ -2161,7 +2161,7 @@ public class ComputerEngine implements Computer { } public final String resolveExternalPackageName(AndroidPackage pkg) { if (pkg.getStaticSharedLibName() != null) { if (pkg.getStaticSharedLibraryName() != null) { return pkg.getManifestPackageName(); } return pkg.getPackageName(); Loading Loading @@ -2378,7 +2378,7 @@ public class ComputerEngine implements Computer { } final SharedLibraryInfo libraryInfo = getSharedLibraryInfo( ps.getPkg().getStaticSharedLibName(), ps.getPkg().getStaticSharedLibVersion()); ps.getPkg().getStaticSharedLibraryName(), ps.getPkg().getStaticSharedLibVersion()); if (libraryInfo == null) { return false; } Loading Loading @@ -2434,7 +2434,7 @@ public class ComputerEngine implements Computer { } final SharedLibraryInfo libraryInfo = getSharedLibraryInfo( ps.getPkg().getSdkLibName(), ps.getPkg().getSdkLibVersionMajor()); ps.getPkg().getSdkLibraryName(), ps.getPkg().getSdkLibVersionMajor()); if (libraryInfo == null) { return false; } Loading services/core/java/com/android/server/pm/DeletePackageHelper.java +7 −7 Original line number Diff line number Diff line Loading @@ -184,11 +184,11 @@ final class DeletePackageHelper { if (pkg != null) { SharedLibraryInfo libraryInfo = null; if (pkg.getStaticSharedLibName() != null) { libraryInfo = computer.getSharedLibraryInfo(pkg.getStaticSharedLibName(), if (pkg.getStaticSharedLibraryName() != null) { libraryInfo = computer.getSharedLibraryInfo(pkg.getStaticSharedLibraryName(), pkg.getStaticSharedLibVersion()); } else if (pkg.getSdkLibName() != null) { libraryInfo = computer.getSharedLibraryInfo(pkg.getSdkLibName(), } else if (pkg.getSdkLibraryName() != null) { libraryInfo = computer.getSharedLibraryInfo(pkg.getSdkLibraryName(), pkg.getSdkLibVersionMajor()); } Loading Loading @@ -544,7 +544,7 @@ final class DeletePackageHelper { } outInfo.mRemovedPackage = ps.getPackageName(); outInfo.mInstallerPackageName = ps.getInstallSource().installerPackageName; outInfo.mIsStaticSharedLib = pkg != null && pkg.getStaticSharedLibName() != null; outInfo.mIsStaticSharedLib = pkg != null && pkg.getStaticSharedLibraryName() != null; outInfo.mRemovedAppId = ps.getAppId(); outInfo.mRemovedUsers = userIds; outInfo.mBroadcastUsers = userIds; Loading Loading @@ -895,8 +895,8 @@ final class DeletePackageHelper { final String packageName = ps.getPkg().getPackageName(); // Skip over if system app, static shared library or and SDK library. if ((ps.getFlags() & ApplicationInfo.FLAG_SYSTEM) != 0 || !TextUtils.isEmpty(ps.getPkg().getStaticSharedLibName()) || !TextUtils.isEmpty(ps.getPkg().getSdkLibName())) { || !TextUtils.isEmpty(ps.getPkg().getStaticSharedLibraryName()) || !TextUtils.isEmpty(ps.getPkg().getSdkLibraryName())) { continue; } if (DEBUG_CLEAN_APKS) { Loading services/core/java/com/android/server/pm/InstallPackageHelper.java +10 −9 Original line number Diff line number Diff line Loading @@ -168,6 +168,7 @@ import com.android.server.pm.permission.Permission; import com.android.server.pm.permission.PermissionManagerServiceInternal; import com.android.server.pm.pkg.AndroidPackage; import com.android.server.pm.pkg.PackageStateInternal; import com.android.server.pm.pkg.SharedLibraryWrapper; import com.android.server.pm.pkg.component.ComponentMutateUtils; import com.android.server.pm.pkg.component.ParsedInstrumentation; import com.android.server.pm.pkg.component.ParsedPermission; Loading Loading @@ -351,7 +352,7 @@ final class InstallPackageHelper { } if (reconciledPkg.mCollectedSharedLibraryInfos != null || (oldPkgSetting != null && oldPkgSetting.getUsesLibraryInfos() != null)) { || (oldPkgSetting != null && oldPkgSetting.getUsesLibraries() != null)) { // Reconcile if the new package or the old package uses shared libraries. // It is possible that the old package uses shared libraries but the new one doesn't. mSharedLibraries.executeSharedLibrariesUpdate(pkg, pkgSetting, null, null, Loading Loading @@ -442,7 +443,7 @@ final class InstallPackageHelper { // Also need to kill any apps that are dependent on the library, except the case of // installation of new version static shared library. if (clientLibPkgs != null) { if (pkg.getStaticSharedLibName() == null || isReplace) { if (pkg.getStaticSharedLibraryName() == null || isReplace) { for (int i = 0; i < clientLibPkgs.size(); i++) { AndroidPackage clientPkg = clientLibPkgs.get(i); mPm.killApplication(clientPkg.getPackageName(), Loading Loading @@ -1141,7 +1142,7 @@ final class InstallPackageHelper { if (signatureCheckPs == null && parsedPackage.isSdkLibrary()) { WatchedLongSparseArray<SharedLibraryInfo> libraryInfos = mSharedLibraries.getSharedLibraryInfos( parsedPackage.getSdkLibName()); parsedPackage.getSdkLibraryName()); if (libraryInfos != null && libraryInfos.size() > 0) { // Any existing version would do. SharedLibraryInfo libraryInfo = libraryInfos.valueAt(0); Loading Loading @@ -1578,7 +1579,7 @@ final class InstallPackageHelper { removedInfo.mInstallerPackageName = ps.getInstallSource().installerPackageName; removedInfo.mIsStaticSharedLib = parsedPackage.getStaticSharedLibName() != null; parsedPackage.getStaticSharedLibraryName() != null; removedInfo.mIsUpdate = true; removedInfo.mOrigUsers = installedUsers; removedInfo.mInstallReasons = new SparseIntArray(installedUsers.length); Loading Loading @@ -2059,9 +2060,9 @@ final class InstallPackageHelper { // Retrieve the overlays for shared libraries of the package. if (!ps.getPkgState().getUsesLibraryInfos().isEmpty()) { for (SharedLibraryInfo sharedLib : ps.getPkgState().getUsesLibraryInfos()) { for (SharedLibraryWrapper sharedLib : ps.getPkgState().getUsesLibraryInfos()) { for (int currentUserId : UserManagerService.getInstance().getUserIds()) { if (!sharedLib.isDynamic()) { if (sharedLib.getType() != SharedLibraryInfo.TYPE_DYNAMIC) { // TODO(146804378): Support overlaying static shared libraries continue; } Loading Loading @@ -2684,7 +2685,7 @@ final class InstallPackageHelper { } // Send installed broadcasts if the package is not a static shared lib. if (request.getPkg().getStaticSharedLibName() == null) { if (request.getPkg().getStaticSharedLibraryName() == null) { mPm.mProcessLoggingHandler.invalidateBaseApkHash(request.getPkg().getBaseApkPath()); // Send added for users that see the package for the first time Loading Loading @@ -2813,7 +2814,7 @@ final class InstallPackageHelper { // No need to kill consumers if it's installation of new version static shared lib. final Computer snapshot = mPm.snapshotComputer(); final boolean dontKillApp = !update && request.getPkg().getStaticSharedLibName() != null; && request.getPkg().getStaticSharedLibraryName() != null; for (int i = 0; i < request.getLibraryConsumers().size(); i++) { AndroidPackage pkg = request.getLibraryConsumers().get(i); // send broadcast that all consumers of the static shared library have changed Loading Loading @@ -4297,7 +4298,7 @@ final class InstallPackageHelper { long maxVersionCode = Long.MAX_VALUE; WatchedLongSparseArray<SharedLibraryInfo> versionedLib = mSharedLibraries.getSharedLibraryInfos(pkg.getStaticSharedLibName()); mSharedLibraries.getSharedLibraryInfos(pkg.getStaticSharedLibraryName()); if (versionedLib != null) { final int versionCount = versionedLib.size(); for (int i = 0; i < versionCount; i++) { Loading services/core/java/com/android/server/pm/PackageManagerService.java +8 −10 Original line number Diff line number Diff line Loading @@ -210,7 +210,6 @@ import com.android.server.pm.permission.LegacyPermissionManagerService; import com.android.server.pm.permission.PermissionManagerService; import com.android.server.pm.permission.PermissionManagerServiceInternal; import com.android.server.pm.pkg.AndroidPackage; import com.android.server.pm.pkg.PackageState; import com.android.server.pm.pkg.PackageStateInternal; import com.android.server.pm.pkg.PackageUserState; import com.android.server.pm.pkg.PackageUserStateInternal; Loading @@ -223,7 +222,6 @@ import com.android.server.pm.pkg.mutate.PackageUserStateWrite; import com.android.server.pm.pkg.parsing.ParsingPackageUtils; import com.android.server.pm.resolution.ComponentResolver; import com.android.server.pm.resolution.ComponentResolverApi; import com.android.server.pm.snapshot.PackageDataSnapshot; import com.android.server.pm.verify.domain.DomainVerificationManagerInternal; import com.android.server.pm.verify.domain.DomainVerificationService; import com.android.server.pm.verify.domain.proxy.DomainVerificationProxy; Loading Loading @@ -5491,19 +5489,19 @@ public class PackageManagerService implements PackageSender, TestUtilityService AndroidPackage pkg = packageState.getPkg(); if (pkg != null) { // Cannot hide SDK libs as they are controlled by SDK manager. if (pkg.getSdkLibName() != null) { if (pkg.getSdkLibraryName() != null) { Slog.w(TAG, "Cannot hide package: " + packageName + " providing SDK library: " + pkg.getSdkLibName()); + pkg.getSdkLibraryName()); return false; } // Cannot hide static shared libs as they are considered // a part of the using app (emulating static linking). Also // static libs are installed always on internal storage. if (pkg.getStaticSharedLibName() != null) { if (pkg.getStaticSharedLibraryName() != null) { Slog.w(TAG, "Cannot hide package: " + packageName + " providing static shared library: " + pkg.getStaticSharedLibName()); + pkg.getStaticSharedLibraryName()); return false; } } Loading Loading @@ -5546,17 +5544,17 @@ public class PackageManagerService implements PackageSender, TestUtilityService if (packageState != null && packageState.getPkg() != null) { AndroidPackage pkg = packageState.getPkg(); // Cannot block uninstall SDK libs as they are controlled by SDK manager. if (pkg.getSdkLibName() != null) { if (pkg.getSdkLibraryName() != null) { Slog.w(PackageManagerService.TAG, "Cannot block uninstall of package: " + packageName + " providing SDK library: " + pkg.getSdkLibName()); + " providing SDK library: " + pkg.getSdkLibraryName()); return false; } // Cannot block uninstall of static shared libs as they are // considered a part of the using app (emulating static linking). // Also static libs are installed always on internal storage. if (pkg.getStaticSharedLibName() != null) { if (pkg.getStaticSharedLibraryName() != null) { Slog.w(PackageManagerService.TAG, "Cannot block uninstall of package: " + packageName + " providing static shared library: " + pkg.getStaticSharedLibName()); + " providing static shared library: " + pkg.getStaticSharedLibraryName()); return false; } } Loading services/core/java/com/android/server/pm/PackageSetting.java +15 −6 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
services/core/java/com/android/server/pm/ComputerEngine.java +3 −3 Original line number Diff line number Diff line Loading @@ -2161,7 +2161,7 @@ public class ComputerEngine implements Computer { } public final String resolveExternalPackageName(AndroidPackage pkg) { if (pkg.getStaticSharedLibName() != null) { if (pkg.getStaticSharedLibraryName() != null) { return pkg.getManifestPackageName(); } return pkg.getPackageName(); Loading Loading @@ -2378,7 +2378,7 @@ public class ComputerEngine implements Computer { } final SharedLibraryInfo libraryInfo = getSharedLibraryInfo( ps.getPkg().getStaticSharedLibName(), ps.getPkg().getStaticSharedLibVersion()); ps.getPkg().getStaticSharedLibraryName(), ps.getPkg().getStaticSharedLibVersion()); if (libraryInfo == null) { return false; } Loading Loading @@ -2434,7 +2434,7 @@ public class ComputerEngine implements Computer { } final SharedLibraryInfo libraryInfo = getSharedLibraryInfo( ps.getPkg().getSdkLibName(), ps.getPkg().getSdkLibVersionMajor()); ps.getPkg().getSdkLibraryName(), ps.getPkg().getSdkLibVersionMajor()); if (libraryInfo == null) { return false; } Loading
services/core/java/com/android/server/pm/DeletePackageHelper.java +7 −7 Original line number Diff line number Diff line Loading @@ -184,11 +184,11 @@ final class DeletePackageHelper { if (pkg != null) { SharedLibraryInfo libraryInfo = null; if (pkg.getStaticSharedLibName() != null) { libraryInfo = computer.getSharedLibraryInfo(pkg.getStaticSharedLibName(), if (pkg.getStaticSharedLibraryName() != null) { libraryInfo = computer.getSharedLibraryInfo(pkg.getStaticSharedLibraryName(), pkg.getStaticSharedLibVersion()); } else if (pkg.getSdkLibName() != null) { libraryInfo = computer.getSharedLibraryInfo(pkg.getSdkLibName(), } else if (pkg.getSdkLibraryName() != null) { libraryInfo = computer.getSharedLibraryInfo(pkg.getSdkLibraryName(), pkg.getSdkLibVersionMajor()); } Loading Loading @@ -544,7 +544,7 @@ final class DeletePackageHelper { } outInfo.mRemovedPackage = ps.getPackageName(); outInfo.mInstallerPackageName = ps.getInstallSource().installerPackageName; outInfo.mIsStaticSharedLib = pkg != null && pkg.getStaticSharedLibName() != null; outInfo.mIsStaticSharedLib = pkg != null && pkg.getStaticSharedLibraryName() != null; outInfo.mRemovedAppId = ps.getAppId(); outInfo.mRemovedUsers = userIds; outInfo.mBroadcastUsers = userIds; Loading Loading @@ -895,8 +895,8 @@ final class DeletePackageHelper { final String packageName = ps.getPkg().getPackageName(); // Skip over if system app, static shared library or and SDK library. if ((ps.getFlags() & ApplicationInfo.FLAG_SYSTEM) != 0 || !TextUtils.isEmpty(ps.getPkg().getStaticSharedLibName()) || !TextUtils.isEmpty(ps.getPkg().getSdkLibName())) { || !TextUtils.isEmpty(ps.getPkg().getStaticSharedLibraryName()) || !TextUtils.isEmpty(ps.getPkg().getSdkLibraryName())) { continue; } if (DEBUG_CLEAN_APKS) { Loading
services/core/java/com/android/server/pm/InstallPackageHelper.java +10 −9 Original line number Diff line number Diff line Loading @@ -168,6 +168,7 @@ import com.android.server.pm.permission.Permission; import com.android.server.pm.permission.PermissionManagerServiceInternal; import com.android.server.pm.pkg.AndroidPackage; import com.android.server.pm.pkg.PackageStateInternal; import com.android.server.pm.pkg.SharedLibraryWrapper; import com.android.server.pm.pkg.component.ComponentMutateUtils; import com.android.server.pm.pkg.component.ParsedInstrumentation; import com.android.server.pm.pkg.component.ParsedPermission; Loading Loading @@ -351,7 +352,7 @@ final class InstallPackageHelper { } if (reconciledPkg.mCollectedSharedLibraryInfos != null || (oldPkgSetting != null && oldPkgSetting.getUsesLibraryInfos() != null)) { || (oldPkgSetting != null && oldPkgSetting.getUsesLibraries() != null)) { // Reconcile if the new package or the old package uses shared libraries. // It is possible that the old package uses shared libraries but the new one doesn't. mSharedLibraries.executeSharedLibrariesUpdate(pkg, pkgSetting, null, null, Loading Loading @@ -442,7 +443,7 @@ final class InstallPackageHelper { // Also need to kill any apps that are dependent on the library, except the case of // installation of new version static shared library. if (clientLibPkgs != null) { if (pkg.getStaticSharedLibName() == null || isReplace) { if (pkg.getStaticSharedLibraryName() == null || isReplace) { for (int i = 0; i < clientLibPkgs.size(); i++) { AndroidPackage clientPkg = clientLibPkgs.get(i); mPm.killApplication(clientPkg.getPackageName(), Loading Loading @@ -1141,7 +1142,7 @@ final class InstallPackageHelper { if (signatureCheckPs == null && parsedPackage.isSdkLibrary()) { WatchedLongSparseArray<SharedLibraryInfo> libraryInfos = mSharedLibraries.getSharedLibraryInfos( parsedPackage.getSdkLibName()); parsedPackage.getSdkLibraryName()); if (libraryInfos != null && libraryInfos.size() > 0) { // Any existing version would do. SharedLibraryInfo libraryInfo = libraryInfos.valueAt(0); Loading Loading @@ -1578,7 +1579,7 @@ final class InstallPackageHelper { removedInfo.mInstallerPackageName = ps.getInstallSource().installerPackageName; removedInfo.mIsStaticSharedLib = parsedPackage.getStaticSharedLibName() != null; parsedPackage.getStaticSharedLibraryName() != null; removedInfo.mIsUpdate = true; removedInfo.mOrigUsers = installedUsers; removedInfo.mInstallReasons = new SparseIntArray(installedUsers.length); Loading Loading @@ -2059,9 +2060,9 @@ final class InstallPackageHelper { // Retrieve the overlays for shared libraries of the package. if (!ps.getPkgState().getUsesLibraryInfos().isEmpty()) { for (SharedLibraryInfo sharedLib : ps.getPkgState().getUsesLibraryInfos()) { for (SharedLibraryWrapper sharedLib : ps.getPkgState().getUsesLibraryInfos()) { for (int currentUserId : UserManagerService.getInstance().getUserIds()) { if (!sharedLib.isDynamic()) { if (sharedLib.getType() != SharedLibraryInfo.TYPE_DYNAMIC) { // TODO(146804378): Support overlaying static shared libraries continue; } Loading Loading @@ -2684,7 +2685,7 @@ final class InstallPackageHelper { } // Send installed broadcasts if the package is not a static shared lib. if (request.getPkg().getStaticSharedLibName() == null) { if (request.getPkg().getStaticSharedLibraryName() == null) { mPm.mProcessLoggingHandler.invalidateBaseApkHash(request.getPkg().getBaseApkPath()); // Send added for users that see the package for the first time Loading Loading @@ -2813,7 +2814,7 @@ final class InstallPackageHelper { // No need to kill consumers if it's installation of new version static shared lib. final Computer snapshot = mPm.snapshotComputer(); final boolean dontKillApp = !update && request.getPkg().getStaticSharedLibName() != null; && request.getPkg().getStaticSharedLibraryName() != null; for (int i = 0; i < request.getLibraryConsumers().size(); i++) { AndroidPackage pkg = request.getLibraryConsumers().get(i); // send broadcast that all consumers of the static shared library have changed Loading Loading @@ -4297,7 +4298,7 @@ final class InstallPackageHelper { long maxVersionCode = Long.MAX_VALUE; WatchedLongSparseArray<SharedLibraryInfo> versionedLib = mSharedLibraries.getSharedLibraryInfos(pkg.getStaticSharedLibName()); mSharedLibraries.getSharedLibraryInfos(pkg.getStaticSharedLibraryName()); if (versionedLib != null) { final int versionCount = versionedLib.size(); for (int i = 0; i < versionCount; i++) { Loading
services/core/java/com/android/server/pm/PackageManagerService.java +8 −10 Original line number Diff line number Diff line Loading @@ -210,7 +210,6 @@ import com.android.server.pm.permission.LegacyPermissionManagerService; import com.android.server.pm.permission.PermissionManagerService; import com.android.server.pm.permission.PermissionManagerServiceInternal; import com.android.server.pm.pkg.AndroidPackage; import com.android.server.pm.pkg.PackageState; import com.android.server.pm.pkg.PackageStateInternal; import com.android.server.pm.pkg.PackageUserState; import com.android.server.pm.pkg.PackageUserStateInternal; Loading @@ -223,7 +222,6 @@ import com.android.server.pm.pkg.mutate.PackageUserStateWrite; import com.android.server.pm.pkg.parsing.ParsingPackageUtils; import com.android.server.pm.resolution.ComponentResolver; import com.android.server.pm.resolution.ComponentResolverApi; import com.android.server.pm.snapshot.PackageDataSnapshot; import com.android.server.pm.verify.domain.DomainVerificationManagerInternal; import com.android.server.pm.verify.domain.DomainVerificationService; import com.android.server.pm.verify.domain.proxy.DomainVerificationProxy; Loading Loading @@ -5491,19 +5489,19 @@ public class PackageManagerService implements PackageSender, TestUtilityService AndroidPackage pkg = packageState.getPkg(); if (pkg != null) { // Cannot hide SDK libs as they are controlled by SDK manager. if (pkg.getSdkLibName() != null) { if (pkg.getSdkLibraryName() != null) { Slog.w(TAG, "Cannot hide package: " + packageName + " providing SDK library: " + pkg.getSdkLibName()); + pkg.getSdkLibraryName()); return false; } // Cannot hide static shared libs as they are considered // a part of the using app (emulating static linking). Also // static libs are installed always on internal storage. if (pkg.getStaticSharedLibName() != null) { if (pkg.getStaticSharedLibraryName() != null) { Slog.w(TAG, "Cannot hide package: " + packageName + " providing static shared library: " + pkg.getStaticSharedLibName()); + pkg.getStaticSharedLibraryName()); return false; } } Loading Loading @@ -5546,17 +5544,17 @@ public class PackageManagerService implements PackageSender, TestUtilityService if (packageState != null && packageState.getPkg() != null) { AndroidPackage pkg = packageState.getPkg(); // Cannot block uninstall SDK libs as they are controlled by SDK manager. if (pkg.getSdkLibName() != null) { if (pkg.getSdkLibraryName() != null) { Slog.w(PackageManagerService.TAG, "Cannot block uninstall of package: " + packageName + " providing SDK library: " + pkg.getSdkLibName()); + " providing SDK library: " + pkg.getSdkLibraryName()); return false; } // Cannot block uninstall of static shared libs as they are // considered a part of the using app (emulating static linking). // Also static libs are installed always on internal storage. if (pkg.getStaticSharedLibName() != null) { if (pkg.getStaticSharedLibraryName() != null) { Slog.w(PackageManagerService.TAG, "Cannot block uninstall of package: " + packageName + " providing static shared library: " + pkg.getStaticSharedLibName()); + " providing static shared library: " + pkg.getStaticSharedLibraryName()); return false; } } Loading
services/core/java/com/android/server/pm/PackageSetting.java +15 −6 File changed.Preview size limit exceeded, changes collapsed. Show changes