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

Commit 4526e2a5 authored by Jiakai Zhang's avatar Jiakai Zhang Committed by Gerrit Code Review
Browse files

Merge "Don't clear profile on otapreopt." into main

parents 4499839c 5b5be651
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -437,6 +437,9 @@ private:
                    maybe_open_reference_profile(parameters_.pkgName, parameters_.apk_path,
                                                 parameters_.profile_name, profile_guided,
                                                 is_public, parameters_.uid, is_secondary_dex);
            // `maybe_open_reference_profile` installs a hook that clears the profile on
            // destruction. Disable it.
            reference_profile.DisableCleanup();
            struct stat sbuf;
            if (reference_profile.fd() == -1 ||
                (fstat(reference_profile.fd(), &sbuf) != -1 && sbuf.st_size == 0)) {