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

Commit a249a0da authored by Chun-Wei Wang's avatar Chun-Wei Wang Committed by Android (Google) Code Review
Browse files

Merge "Fix perf regression when creating new users"

parents 0600b6b3 54ffdc59
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -622,7 +622,7 @@ final class AppDataHelper {
    private boolean shouldHaveAppStorage(AndroidPackage pkg) {
        PackageManager.Property noAppDataProp =
                pkg.getProperties().get(PackageManager.PROPERTY_NO_APP_DATA_STORAGE);
        return noAppDataProp == null || !noAppDataProp.getBoolean();
        return (noAppDataProp == null || !noAppDataProp.getBoolean()) && pkg.getUid() >= 0;
    }

    /**
+5 −0
Original line number Diff line number Diff line
@@ -4184,6 +4184,11 @@ public final class Settings implements Watchable, Snappable {
                        UNINSTALL_REASON_USER_TYPE : UNINSTALL_REASON_UNKNOWN;
                ps.setUninstallReason(uninstallReason, userHandle);
                if (shouldReallyInstall) {
                    if (ps.getAppId() < 0) {
                        // No need to create data directories for packages with invalid app id
                        // such as APEX
                        continue;
                    }
                    // Need to create a data directory for all apps installed for this user.
                    // Accumulate all required args and call the installer after mPackages lock
                    // has been released