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

Commit 806bfa56 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Log if installers drop attribute installLocation"

parents 8ba1eee0 49bda530
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2357,6 +2357,17 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
                        "Invalid filename: " + targetName);
            }

            // Yell loudly if installers drop attribute installLocation when apps explicitly set.
            if (apk.installLocation != PackageInfo.INSTALL_LOCATION_UNSPECIFIED) {
                final String installerPackageName = getInstallerPackageName();
                if (installerPackageName != null
                        && (params.installLocation != apk.installLocation)) {
                    Slog.wtf(TAG, installerPackageName
                            + " drops manifest attribute android:installLocation in " + targetName
                            + " for " + mPackageName);
                }
            }

            final File targetFile = new File(stageDir, targetName);
            resolveAndStageFileLocked(addedFile, targetFile, apk.splitName);