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

Commit 7221434c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[RESTRICT AUTOMERGE] Check whether installerPackageName contains only...

Merge "[RESTRICT AUTOMERGE] Check whether installerPackageName contains only valid characters" into tm-dev
parents df4e7158 6dab1526
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -640,13 +640,18 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
        params.appLabel = TextUtils.trimToSize(params.appLabel,
                PackageItemInfo.MAX_SAFE_LABEL_LENGTH);

        // Validate installer package name.
        // Validate requested installer package name.
        if (params.installerPackageName != null && !isValidPackageName(
                params.installerPackageName)) {
            params.installerPackageName = null;
        }

        var requestedInstallerPackageName =
        // Validate installer package name.
        if (installerPackageName != null && !isValidPackageName(installerPackageName)) {
            installerPackageName = null;
        }

        String requestedInstallerPackageName =
                params.installerPackageName != null ? params.installerPackageName
                        : installerPackageName;