Loading services/core/java/com/android/server/pm/PackageManagerService.java +9 −7 Original line number Diff line number Diff line Loading @@ -5461,13 +5461,19 @@ public class PackageManagerService implements PackageSender, TestUtilityService final long callingId = Binder.clearCallingIdentity(); try { final PackageStateInternal packageState = snapshot.getPackageStateForInstalledAndFiltered( packageName, callingUid, userId); final PackageStateInternal packageState = snapshot.getPackageStateInternal( packageName); if (packageState == null) { return false; } final PackageUserStateInternal userState = packageState.getUserStateOrDefault( userId); if (userState.isHidden() == hidden || !userState.isInstalled() || snapshot.shouldFilterApplication(packageState, callingUid, userId)) { 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. Loading Loading @@ -5497,10 +5503,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService return false; } if (packageState.getUserStateOrDefault(userId).isHidden() == hidden) { return false; } commitPackageStateMutation(null, packageName, packageState1 -> packageState1.userState(userId).setHidden(hidden)); Loading Loading
services/core/java/com/android/server/pm/PackageManagerService.java +9 −7 Original line number Diff line number Diff line Loading @@ -5461,13 +5461,19 @@ public class PackageManagerService implements PackageSender, TestUtilityService final long callingId = Binder.clearCallingIdentity(); try { final PackageStateInternal packageState = snapshot.getPackageStateForInstalledAndFiltered( packageName, callingUid, userId); final PackageStateInternal packageState = snapshot.getPackageStateInternal( packageName); if (packageState == null) { return false; } final PackageUserStateInternal userState = packageState.getUserStateOrDefault( userId); if (userState.isHidden() == hidden || !userState.isInstalled() || snapshot.shouldFilterApplication(packageState, callingUid, userId)) { 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. Loading Loading @@ -5497,10 +5503,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService return false; } if (packageState.getUserStateOrDefault(userId).isHidden() == hidden) { return false; } commitPackageStateMutation(null, packageName, packageState1 -> packageState1.userState(userId).setHidden(hidden)); Loading