diff options
| author | 2017-09-20 18:59:12 -0700 | |
|---|---|---|
| committer | 2017-10-06 20:13:01 +0000 | |
| commit | 0b067c6ecdfee4fb784d9370d00adb48a321bc3f (patch) | |
| tree | 0a62cad81488cb06e45925643770c093731b764b | |
| parent | 625d6a8cd8e093f85aea394865c970997ca33767 (diff) | |
Revert "Remove UID requirement for set sched_fifo for sensor thread"
This reverts commit 76dc595d2a268792900663dac756c691374bae85.
Bug: 37291237
Test: compiles and 2016, 2017 device works with other CLs in this topic.
| -rw-r--r-- | services/schedulerservice/SchedulingPolicyService.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/schedulerservice/SchedulingPolicyService.cpp b/services/schedulerservice/SchedulingPolicyService.cpp index 1f6ed57913..a1106cf49b 100644 --- a/services/schedulerservice/SchedulingPolicyService.cpp +++ b/services/schedulerservice/SchedulingPolicyService.cpp @@ -17,6 +17,8 @@ #include "SchedulingPolicyService.h" +#include <private/android_filesystem_config.h> // for AID_CAMERASERVER + #include <log/log.h> #include <hwbinder/IPCThreadState.h> #include <mediautils/SchedulingPolicyService.h> @@ -28,8 +30,9 @@ namespace V1_0 { namespace implementation { bool SchedulingPolicyService::isAllowed() { - // TODO(b/37291237) - return true; + using ::android::hardware::IPCThreadState; + + return IPCThreadState::self()->getCallingUid() == AID_CAMERASERVER; } Return<bool> SchedulingPolicyService::requestPriority(int32_t pid, int32_t tid, int32_t priority) { |