Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5c867c8 authored by Svet Ganov's avatar Svet Ganov Committed by Svetoslav Ganov
Browse files

Query for static shared libs as well when needed

System components can see static shared libs but have to
explicitly request that. This change explicitly requests
static shared libs as well in the package manager shell
command, the package installer and the package manager
where needed.

Test: Static shared lib CTS tests pass

bug:36632271

Change-Id: I26804571be327888b830e2f6bccdcbaa820f763c
parent 32eee4f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1093,7 +1093,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
        PackageInfo packageInfo = null;
        try {
            packageInfo = AppGlobals.getPackageManager().getPackageInfo(
                    basePackageName, 0, userId);
                    basePackageName, PackageManager.MATCH_STATIC_SHARED_LIBRARIES, userId);
        } catch (RemoteException ignored) {
        }
        if (packageInfo == null || packageInfo.applicationInfo == null) {
+2 −1
Original line number Diff line number Diff line
@@ -210,7 +210,8 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
        public boolean handleMessage(Message msg) {
            // Cache package manager data without the lock held
            final PackageInfo pkgInfo = mPm.getPackageInfo(
                    params.appPackageName, PackageManager.GET_SIGNATURES /*flags*/, userId);
                    params.appPackageName, PackageManager.GET_SIGNATURES
                            | PackageManager.MATCH_STATIC_SHARED_LIBRARIES /*flags*/, userId);
            final ApplicationInfo appInfo = mPm.getApplicationInfo(
                    params.appPackageName, 0, userId);

+2 −1
Original line number Diff line number Diff line
@@ -889,7 +889,8 @@ class PackageManagerShellCommand extends ShellCommand {
            userId = UserHandle.USER_SYSTEM;
            flags |= PackageManager.DELETE_ALL_USERS;
        } else {
            final PackageInfo info = mInterface.getPackageInfo(packageName, 0, userId);
            final PackageInfo info = mInterface.getPackageInfo(packageName,
                    PackageManager.MATCH_STATIC_SHARED_LIBRARIES, userId);
            if (info == null) {
                pw.println("Failure [not installed for " + userId + "]");
                return 1;