summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Peng Xu <pengxu@google.com> 2017-10-06 20:26:45 +0000
committer android-build-merger <android-build-merger@google.com> 2017-10-06 20:26:45 +0000
commit1f9a85e4b459b99d91d043d0bc7e39466aa51e09 (patch)
tree65158ea8e9204e85c4f884ed26ae4c370425081e
parent9f9cdcf24e0d451c777d299312c52fade1629330 (diff)
parentad8c57870572d3578c4925181a9fc1b812eeabce (diff)
Merge "Revert "Remove UID requirement for set sched_fifo for sensor thread"" am: c599e05ba0
am: ad8c578705 Change-Id: I8acaa6eaccdbce6482f6a49ef6666e6d2dc82fbd
-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) {