From 633e1fbfedac66919a1e960640aa29376dd886dd Mon Sep 17 00:00:00 2001 From: Dario Freni Date: Fri, 11 Dec 2020 13:57:58 +0000 Subject: Revert "installd: Fix set dex2oat to background after boot_complete" This reverts commit c919183ba4fafcf2e92f6f62d25ee930f62bb0bb. Reason for revert: Potential culprit of DeviceBootTest.DeviceBootTest#SELinuxUncheckedDenialBootTest Change-Id: I17b601364308bcf074cc2f2390f51e099c338765 --- cmds/installd/dexopt.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp index 65fc46ecaf..594880ac60 100644 --- a/cmds/installd/dexopt.cpp +++ b/cmds/installd/dexopt.cpp @@ -1818,13 +1818,10 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins pid_t pid = fork(); if (pid == 0) { - // Need to set schedpolicy before dropping privileges - // for cgroup migration. See details at b/175178520. - SetDex2OatScheduling(boot_complete); - /* child -- drop privileges before continuing */ drop_capabilities(uid); + SetDex2OatScheduling(boot_complete); if (flock(out_oat.fd(), LOCK_EX | LOCK_NB) != 0) { PLOG(ERROR) << "flock(" << out_oat.path() << ") failed"; _exit(DexoptReturnCodes::kFlock); -- cgit v1.2.3-59-g8ed1b