Merge "Sets the first boot in installd to create data directories with project id" am: 88e0d21b31

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1946688

Change-Id: Ib7392ca2c327cf4076c7cfd6b0af15c10cc162f5
This commit is contained in:
Shikha Malhotra
2022-03-22 16:49:24 +00:00
committed by Automerger Merge Worker
2 changed files with 21 additions and 0 deletions

View File

@@ -255,6 +255,17 @@ public class Installer extends SystemService {
}
}
/**
* Sets in Installd that it is first boot after data wipe
*/
public void setFirstBoot() throws InstallerException {
try {
mInstalld.setFirstBoot();
} catch (RemoteException e) {
throw InstallerException.from(e);
}
}
/**
* Class that collects multiple {@code installd} operations together in an
* attempt to more efficiently execute them in bulk.

View File

@@ -7554,6 +7554,16 @@ public class PackageManagerService extends IPackageManager.Stub
/* excludePreCreated= */ false));
t.traceEnd();
if (mFirstBoot) {
t.traceBegin("setFirstBoot: ");
try {
mInstaller.setFirstBoot();
} catch (InstallerException e) {
Slog.w(TAG, "Could not set First Boot: ", e);
}
t.traceEnd();
}
mPermissionManager.readLegacyPermissionsTEMP(mSettings.mPermissions);
mPermissionManager.readLegacyPermissionStateTEMP();