summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Martijn Coenen <maco@google.com> 2017-05-06 04:46:45 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-05-06 04:46:47 +0000
commitfc93a4bd893cfc71ecea0f9e155b67b592e17a0a (patch)
tree4f17b1ace9efe9fe1fc3155e8dc0f377288dd3c7 /libs/binder/Parcel.cpp
parent4b567487b7372d6bc4bb3c697723f7f5d464966b (diff)
parent2b6317436d2035ce98331906aaaca87e6026c9c8 (diff)
Merge "Correctly set minimum priority on nodes." into oc-dev
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 39bb078fd1..aec8f107a3 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -211,7 +211,14 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/,
{
flat_binder_object obj;
- obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
+ if (IPCThreadState::self()->backgroundSchedulingDisabled()) {
+ /* minimum priority for all nodes is nice 0 */
+ obj.flags = FLAT_BINDER_FLAG_ACCEPTS_FDS;
+ } else {
+ /* minimum priority for all nodes is MAX_NICE(19) */
+ obj.flags = 0x13 | FLAT_BINDER_FLAG_ACCEPTS_FDS;
+ }
+
if (binder != NULL) {
IBinder *local = binder->localBinder();
if (!local) {