Makes static shared libs visible to installer
Prior to this change, shared libraries could be installed by, but were
not visible to installers. This made management of them impossible.
Change-Id: Id6e45a2ad8d5b1dbb8b5e0967a035ec53268904d
Fixes: 66673959
Test: manual - installed static lib and verified installer could view it
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 9fce12c..eb6d4dc 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4223,6 +4223,11 @@
|| appId == Process.ROOT_UID) {
return false;
}
+ // Installer gets to see all static libs.
+ if (PackageManager.PERMISSION_GRANTED
+ == checkUidPermission(Manifest.permission.INSTALL_PACKAGES, uid)) {
+ return false;
+ }
}
// No package means no static lib as it is always on internal storage