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

Commit ff10c9c0 authored by Patrick Baumann's avatar Patrick Baumann
Browse files

Fixes force-uuid behavior

Prior to this change and due to an error in the recent removal of asec
code from the framework, force-uuid installs were treated the same as
any non-internal install, relying on resolve and install preferences
instead of explicitly using the forced uuid. This change corrects that
behavior.

Bug: 109941548
Test: atest CtsAppSecurityHostTestCases
Change-Id: Id2dddfbb78a5083e74ef4ae1f8df8f468f724546
parent eb458627
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -486,10 +486,12 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
                if (!PackageHelper.fitsOnInternal(mContext, params)) {
                    throw new IOException("No suitable internal storage available");
                }
            } else {
            } else if ((params.installFlags & PackageManager.INSTALL_FORCE_VOLUME_UUID) != 0) {
                // For now, installs to adopted media are treated as internal from
                // an install flag point-of-view.
                params.installFlags |= PackageManager.INSTALL_INTERNAL;
            } else {
                params.installFlags |= PackageManager.INSTALL_INTERNAL;

                // Resolve best location for install, based on combination of
                // requested install flags, delta size, and manifest settings.