Sets the first boot in installd to create data directories with project

id

Bug: b/215154615
Test: Manually test the trace logs after flashing the changes
Change-Id: I493eb5788901c6bec710d7cb72b223e61a9b5439
This commit is contained in:
Shikha Malhotra
2022-01-12 19:48:27 +00:00
parent 1f21e4acf4
commit be8f83a5e5
2 changed files with 21 additions and 0 deletions

View File

@@ -256,6 +256,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

@@ -7555,6 +7555,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();