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

Commit fda1911c authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Revert "Always set initiating package as the installer package"

This reverts commit af6dba8c.
parent af6dba8c
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -5252,8 +5252,19 @@ public class ComputerEngine implements Computer {
                initiatingPackageName = null;
            }
        } else {
            // Always set initiating package as the installer package
            if (Objects.equals(installSource.mInitiatingPackageName,
                    installSource.mInstallerPackageName)) {
                // The installer and initiator will often be the same, and when they are
                // we can skip doing the same check again.
                initiatingPackageName = installerPackageName;
            } else {
                initiatingPackageName = installSource.mInitiatingPackageName;
                final PackageStateInternal ps = mSettings.getPackage(initiatingPackageName);
                if (ps == null
                        || shouldFilterApplicationIncludingUninstalled(ps, callingUid, userId)) {
                    initiatingPackageName = null;
                }
            }
        }

        originatingPackageName = installSource.mOriginatingPackageName;