summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorPeng Xu <pengxu@google.com>2017-10-06 20:13:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-10-06 20:13:35 +0000
commitc599e05ba05dd3622544cd5b875cf3a6cecae8b7 (patch)
tree46491cbb0b381baf2e26d4941420d7f339408d97 /services
parent7fbbfe2494415d0e980841778e5ba8ada85a6cb8 (diff)
parent0b067c6ecdfee4fb784d9370d00adb48a321bc3f (diff)
downloadnative-c599e05ba05dd3622544cd5b875cf3a6cecae8b7.tar.gz
Merge "Revert "Remove UID requirement for set sched_fifo for sensor thread""
Diffstat (limited to 'services')
-rw-r--r--services/schedulerservice/SchedulingPolicyService.cpp7
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) {