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

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

Always set initiating package as the installer package

Some 3rd party apps like Maif are checking through the Talsec
security SDK which package has initiated the installation
of the app.

In our case, install package was `com.android.vending` and the
initiating package was `foundation.e.apps`.

From now on, we just consider that the initiating package is
always the installer package.
parent 3aa86246
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -5252,19 +5252,8 @@ public class ComputerEngine implements Computer {
                initiatingPackageName = null;
            }
        } else {
            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.
            // Always set initiating package as the installer package
            initiatingPackageName = installerPackageName;
            } else {
                initiatingPackageName = installSource.mInitiatingPackageName;
                final PackageStateInternal ps = mSettings.getPackage(initiatingPackageName);
                if (ps == null
                        || shouldFilterApplicationIncludingUninstalled(ps, callingUid, userId)) {
                    initiatingPackageName = null;
                }
            }
        }

        originatingPackageName = installSource.mOriginatingPackageName;