Loading services/core/java/com/android/server/pm/PackageManagerService.java +9 −7 Original line number Original line Diff line number Diff line Loading @@ -5461,13 +5461,19 @@ public class PackageManagerService implements PackageSender, TestUtilityService final long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { try { final PackageStateInternal packageState = final PackageStateInternal packageState = snapshot.getPackageStateInternal( snapshot.getPackageStateForInstalledAndFiltered( packageName); packageName, callingUid, userId); if (packageState == null) { if (packageState == null) { return false; 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 // Cannot hide static shared libs as they are considered // a part of the using app (emulating static linking). Also // a part of the using app (emulating static linking). Also // static libs are installed always on internal storage. // static libs are installed always on internal storage. Loading Loading @@ -5497,10 +5503,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService return false; return false; } } if (packageState.getUserStateOrDefault(userId).isHidden() == hidden) { return false; } commitPackageStateMutation(null, packageName, packageState1 -> commitPackageStateMutation(null, packageName, packageState1 -> packageState1.userState(userId).setHidden(hidden)); packageState1.userState(userId).setHidden(hidden)); Loading Loading
services/core/java/com/android/server/pm/PackageManagerService.java +9 −7 Original line number Original line Diff line number Diff line Loading @@ -5461,13 +5461,19 @@ public class PackageManagerService implements PackageSender, TestUtilityService final long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { try { final PackageStateInternal packageState = final PackageStateInternal packageState = snapshot.getPackageStateInternal( snapshot.getPackageStateForInstalledAndFiltered( packageName); packageName, callingUid, userId); if (packageState == null) { if (packageState == null) { return false; 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 // Cannot hide static shared libs as they are considered // a part of the using app (emulating static linking). Also // a part of the using app (emulating static linking). Also // static libs are installed always on internal storage. // static libs are installed always on internal storage. Loading Loading @@ -5497,10 +5503,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService return false; return false; } } if (packageState.getUserStateOrDefault(userId).isHidden() == hidden) { return false; } commitPackageStateMutation(null, packageName, packageState1 -> commitPackageStateMutation(null, packageName, packageState1 -> packageState1.userState(userId).setHidden(hidden)); packageState1.userState(userId).setHidden(hidden)); Loading