diff options
author | Igor Murashkin <iam@google.com> | 2014-11-06 02:55:23 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-06 02:55:23 +0000 |
commit | cd647d01e5e5a17c272f1a0c691c39cb24ae107c (patch) | |
tree | ddf4c3c155fce5df4e70faddf239bf824e1501c0 /cmds/installd/commands.c | |
parent | 522110485465a05f4602ad42ba14a18b11184cca (diff) | |
parent | 106e582053121f1934c33a6c98d35377e8ae384a (diff) | |
download | frameworks_native-cd647d01e5e5a17c272f1a0c691c39cb24ae107c.zip frameworks_native-cd647d01e5e5a17c272f1a0c691c39cb24ae107c.tar.gz frameworks_native-cd647d01e5e5a17c272f1a0c691c39cb24ae107c.tar.bz2 |
am 106e5820: Merge "installd: Set priority to background for dexopting" into lmp-mr1-dev
* commit '106e582053121f1934c33a6c98d35377e8ae384a':
installd: Set priority to background for dexopting
Diffstat (limited to 'cmds/installd/commands.c')
-rw-r--r-- | cmds/installd/commands.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 0a307c9..f2d8bef 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -20,6 +20,7 @@ #include <cutils/sched_policy.h> #include <diskusage/dirsize.h> #include <selinux/android.h> +#include <system/thread_defs.h> /* Directory records that are used in execution of commands. */ 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)); 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) { ALOGE("flock(%s) failed: %s\n", out_path, strerror(errno)); exit(67); |