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

Commit cd647d01 authored by Igor Murashkin's avatar Igor Murashkin Committed by Android Git Automerger
Browse files

am 106e5820: Merge "installd: Set priority to background for dexopting" into lmp-mr1-dev

* commit '106e5820':
  installd: Set priority to background for dexopting
parents 52211048 106e5820
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@
#include <cutils/sched_policy.h>
#include <cutils/sched_policy.h>
#include <diskusage/dirsize.h>
#include <diskusage/dirsize.h>
#include <selinux/android.h>
#include <selinux/android.h>
#include <system/thread_defs.h>


/* Directory records that are used in execution of commands. */
/* Directory records that are used in execution of commands. */
dir_rec_t android_data_dir;
dir_rec_t android_data_dir;
@@ -1017,6 +1018,10 @@ int dexopt(const char *apk_path, uid_t uid, bool is_public,
            ALOGE("set_sched_policy failed: %s\n", strerror(errno));
            ALOGE("set_sched_policy failed: %s\n", strerror(errno));
            exit(70);
            exit(70);
        }
        }
        if (setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_BACKGROUND) < 0) {
            ALOGE("setpriority failed: %s\n", strerror(errno));
            exit(71);
        }
        if (flock(out_fd, LOCK_EX | LOCK_NB) != 0) {
        if (flock(out_fd, LOCK_EX | LOCK_NB) != 0) {
            ALOGE("flock(%s) failed: %s\n", out_path, strerror(errno));
            ALOGE("flock(%s) failed: %s\n", out_path, strerror(errno));
            exit(67);
            exit(67);