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

Commit b4c298e3 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Installing packages always needs to create dirs.

When we're installing an existing app for a user, we still need to
create the private data storage for that app.

Bug: 26554043
Change-Id: Ie18e0952600f860325718f84094aedeac3681403
parent 8f31333f
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -10216,7 +10216,7 @@ public class PackageManagerService extends IPackageManager.Stub {
        long callingId = Binder.clearCallingIdentity();
        try {
            boolean sendAdded = false;
            boolean installed = false;
            // writer
            synchronized (mPackages) {
@@ -10228,11 +10228,21 @@ public class PackageManagerService extends IPackageManager.Stub {
                    pkgSetting.setInstalled(true, userId);
                    pkgSetting.setHidden(false, userId);
                    mSettings.writePackageRestrictionsLPr(userId);
                    sendAdded = true;
                    installed = true;
                }
            }
            if (installed) {
                synchronized (mInstallLock) {
                    final int flags = Installer.FLAG_DE_STORAGE | Installer.FLAG_CE_STORAGE;
                    try {
                        mInstaller.createAppData(pkgSetting.volumeUuid, packageName, userId, flags,
                                pkgSetting.appId, pkgSetting.pkg.applicationInfo.seinfo);
                    } catch (InstallerException e) {
                        throw new IllegalStateException(e);
                    }
                }
            if (sendAdded) {
                sendPackageAddedForUser(packageName, pkgSetting, userId);
            }
        } finally {