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

Commit 46293ea2 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 sc-dev
parents f5424a34 e05cf74c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -609,12 +609,17 @@ 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;
        }

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

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