Merge "Only create app data for installed apps for new user" into sc-dev am: da4a48d027
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14864167 Change-Id: Iceeb33ff8332cf337387c656a6729d6dbc367a04
This commit is contained in:
@@ -3997,15 +3997,18 @@ public final class Settings implements Watchable, Snappable {
|
|||||||
final int uninstallReason = (shouldMaybeInstall && !shouldReallyInstall) ?
|
final int uninstallReason = (shouldMaybeInstall && !shouldReallyInstall) ?
|
||||||
UNINSTALL_REASON_USER_TYPE : UNINSTALL_REASON_UNKNOWN;
|
UNINSTALL_REASON_USER_TYPE : UNINSTALL_REASON_UNKNOWN;
|
||||||
ps.setUninstallReason(uninstallReason, userHandle);
|
ps.setUninstallReason(uninstallReason, userHandle);
|
||||||
if (!shouldReallyInstall) {
|
if (shouldReallyInstall) {
|
||||||
writeKernelMappingLPr(ps);
|
// Need to create a data directory for all apps installed for this user.
|
||||||
}
|
// Accumulate all required args and call the installer after mPackages lock
|
||||||
// Need to create a data directory for all apps under this user. Accumulate all
|
// has been released
|
||||||
// required args and call the installer after mPackages lock has been released
|
|
||||||
final String seInfo = AndroidPackageUtils.getSeInfo(ps.pkg, ps);
|
final String seInfo = AndroidPackageUtils.getSeInfo(ps.pkg, ps);
|
||||||
batch.createAppData(ps.volumeUuid, ps.name, userHandle,
|
batch.createAppData(ps.volumeUuid, ps.name, userHandle,
|
||||||
StorageManager.FLAG_STORAGE_CE | StorageManager.FLAG_STORAGE_DE, ps.appId,
|
StorageManager.FLAG_STORAGE_CE | StorageManager.FLAG_STORAGE_DE,
|
||||||
seInfo, ps.pkg.getTargetSdkVersion());
|
ps.appId, seInfo, ps.pkg.getTargetSdkVersion());
|
||||||
|
} else {
|
||||||
|
// Make sure the app is excluded from storage mapping for this user
|
||||||
|
writeKernelMappingLPr(ps);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t.traceBegin("createAppData");
|
t.traceBegin("createAppData");
|
||||||
|
|||||||
Reference in New Issue
Block a user