diff options
author | Steve Kondik <steve@cyngn.com> | 2015-09-20 04:20:21 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-17 13:51:11 -0700 |
commit | ccf7c200ce5c805ccfe730b4c4cae2d1a6f5d0a1 (patch) | |
tree | bef85c47995e53ac434088754905a3a745006dd8 /services/inputflinger | |
parent | 80216f64421bc6bf19a6847e76fa122303f7a752 (diff) | |
download | frameworks_native-ccf7c200ce5c805ccfe730b4c4cae2d1a6f5d0a1.zip frameworks_native-ccf7c200ce5c805ccfe730b4c4cae2d1a6f5d0a1.tar.gz frameworks_native-ccf7c200ce5c805ccfe730b4c4cae2d1a6f5d0a1.tar.bz2 |
input: Adjust priority
* Bring into the desired group to get the best result.
Change-Id: I3bd031074cd7006994736b4c22d0294b6012f662
Diffstat (limited to 'services/inputflinger')
-rw-r--r-- | services/inputflinger/InputManager.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp index 6a6547b..4f28840 100644 --- a/services/inputflinger/InputManager.cpp +++ b/services/inputflinger/InputManager.cpp @@ -21,6 +21,7 @@ #include "InputManager.h" #include <cutils/log.h> +#include <cutils/iosched_policy.h> namespace android { @@ -51,13 +52,15 @@ void InputManager::initialize() { } status_t InputManager::start() { - status_t result = mDispatcherThread->run("InputDispatcher", PRIORITY_URGENT_DISPLAY); + status_t result = mDispatcherThread->run("InputDispatcher", + PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE); if (result) { ALOGE("Could not start InputDispatcher thread due to error %d.", result); return result; } - result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY); + result = mReaderThread->run("InputReader", + PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE); if (result) { ALOGE("Could not start InputReader thread due to error %d.", result); @@ -65,6 +68,9 @@ status_t InputManager::start() { return result; } + android_set_rt_ioprio(mDispatcherThread->getTid(), 1); + android_set_rt_ioprio(mReaderThread->getTid(), 1); + return OK; } |