diff options
| author | 2020-02-06 19:36:51 +0000 | |
|---|---|---|
| committer | 2020-02-06 19:36:51 +0000 | |
| commit | 128591318788a52014a0ed4822c02f42e6b1733f (patch) | |
| tree | 10b7c3079a4e9a4584e715bfbe627a52b11af6a0 /libs/gui/BufferQueueThreadState.cpp | |
| parent | 4de0a2887e702887fd51baacbb563c9f4a7d3559 (diff) | |
| parent | 32415facc1b4065151d6e1220bafa5522b53c901 (diff) | |
Merge "Remove need for libbinderthreadstate." am: 26d0eb321c am: 32415facc1
Change-Id: I8b7f0bccf371a9c98f2c274846587325dae1857d
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
| -rw-r--r-- | libs/gui/BufferQueueThreadState.cpp | 5 |
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(); |