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

Commit 5d61940c authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Only create app data for installed apps for new user" into...

Merge "Merge "Only create app data for installed apps for new user" into sc-dev am: da4a48d0 am: c53c8886" into sc-v2-dev-plus-aosp
parents d804cde4 48fba11f
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -3997,15 +3997,18 @@ public final class Settings implements Watchable, Snappable {
                final int uninstallReason = (shouldMaybeInstall && !shouldReallyInstall) ?
                        UNINSTALL_REASON_USER_TYPE : UNINSTALL_REASON_UNKNOWN;
                ps.setUninstallReason(uninstallReason, userHandle);
                if (!shouldReallyInstall) {
                    writeKernelMappingLPr(ps);
                }
                // Need to create a data directory for all apps under this user. Accumulate all
                // required args and call the installer after mPackages lock has been released
                if (shouldReallyInstall) {
                    // 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
                    final String seInfo = AndroidPackageUtils.getSeInfo(ps.pkg, ps);
                    batch.createAppData(ps.volumeUuid, ps.name, userHandle,
                        StorageManager.FLAG_STORAGE_CE | StorageManager.FLAG_STORAGE_DE, ps.appId,
                        seInfo, ps.pkg.getTargetSdkVersion());
                            StorageManager.FLAG_STORAGE_CE | StorageManager.FLAG_STORAGE_DE,
                            ps.appId, seInfo, ps.pkg.getTargetSdkVersion());
                } else {
                    // Make sure the app is excluded from storage mapping for this user
                    writeKernelMappingLPr(ps);
                }
            }
        }
        t.traceBegin("createAppData");