summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueThreadState.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2020-02-06 16:37:22 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-02-06 16:37:22 +0000
commitadea1a8150da149e79701d5c3e6518794c7816f7 (patch)
tree05563eb491003a9cf44c30d6b56e4fcbc1a766f8 /libs/gui/BufferQueueThreadState.cpp
parent7ac76eef06f784e7a7fc14d8462419a704aff75d (diff)
parent2b3f3cd22249270bddd1834dba5605491726d2a4 (diff)
Merge "Remove need for libbinderthreadstate."
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
-rw-r--r--libs/gui/BufferQueueThreadState.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/gui/BufferQueueThreadState.cpp b/libs/gui/BufferQueueThreadState.cpp
index 3b531ec752..c13030b1ed 100644
--- a/libs/gui/BufferQueueThreadState.cpp
+++ b/libs/gui/BufferQueueThreadState.cpp
@@ -15,6 +15,7 @@
*/
#include <binder/IPCThreadState.h>
+#include <binderthreadstate/CallerUtils.h>
#include <hwbinder/IPCThreadState.h>
#include <private/gui/BufferQueueThreadState.h>
#include <unistd.h>
@@ -22,14 +23,14 @@
namespace android {
uid_t BufferQueueThreadState::getCallingUid() {
- if (hardware::IPCThreadState::self()->isServingCall()) {
+ if (getCurrentServingCall() == BinderCallType::HWBINDER) {
return hardware::IPCThreadState::self()->getCallingUid();
}
return IPCThreadState::self()->getCallingUid();
}
pid_t BufferQueueThreadState::getCallingPid() {
- if (hardware::IPCThreadState::self()->isServingCall()) {
+ if (getCurrentServingCall() == BinderCallType::HWBINDER) {
return hardware::IPCThreadState::self()->getCallingPid();
}
return IPCThreadState::self()->getCallingPid();