summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputThread.cpp
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-09-30 21:30:29 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-09-30 21:30:29 +0000
commitd6d2c7ebad05923d25b64fd76eb4eff63e1681dc (patch)
treec3a832ee2af7735fe0b8ca66dcad5e7d8a8b2095 /services/inputflinger/InputThread.cpp
parent7f347cc100a8faf34d6916ba1abaccdcaad792cb (diff)
parentf53fa6b562d6608197329b94e796012e18d11dc7 (diff)
Merge "Only prioritize critical input threads" into main
Diffstat (limited to 'services/inputflinger/InputThread.cpp')
-rw-r--r--services/inputflinger/InputThread.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/inputflinger/InputThread.cpp b/services/inputflinger/InputThread.cpp
index 449eb45b4b..bd4b192e22 100644
--- a/services/inputflinger/InputThread.cpp
+++ b/services/inputflinger/InputThread.cpp
@@ -45,11 +45,12 @@ private:
} // namespace
-InputThread::InputThread(std::string name, std::function<void()> loop, std::function<void()> wake)
+InputThread::InputThread(std::string name, std::function<void()> loop, std::function<void()> wake,
+ bool isInCriticalPath)
: mName(name), mThreadWake(wake) {
mThread = sp<InputThreadImpl>::make(loop);
mThread->run(mName.c_str(), ANDROID_PRIORITY_URGENT_DISPLAY);
- if (input_flags::enable_input_policy_profile()) {
+ if (input_flags::enable_input_policy_profile() && isInCriticalPath) {
if (!applyInputEventProfile()) {
LOG(ERROR) << "Couldn't apply input policy profile for " << name;
}
@@ -84,4 +85,4 @@ bool InputThread::applyInputEventProfile() {
#endif
}
-} // namespace android \ No newline at end of file
+} // namespace android