diff options
| author | 2020-09-10 17:22:18 +0000 | |
|---|---|---|
| committer | 2020-09-10 17:22:18 +0000 | |
| commit | cdb6b16dec3a541b455be99d075004cb2f0a0cd7 (patch) | |
| tree | f7110d50445c67a337105034b1f2db3946a88fef /libs/gui/BufferQueueThreadState.cpp | |
| parent | 171cac1b603e4bb83412eb596d05a500af5d7a76 (diff) | |
| parent | ac07d0f5ab16bb9e8bbbabb589d1c7d36817baa9 (diff) | |
Merge "Merge Android R"
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
| -rw-r--r-- | libs/gui/BufferQueueThreadState.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/gui/BufferQueueThreadState.cpp b/libs/gui/BufferQueueThreadState.cpp index c13030b1ed..976c9b9d50 100644 --- a/libs/gui/BufferQueueThreadState.cpp +++ b/libs/gui/BufferQueueThreadState.cpp @@ -14,8 +14,10 @@ * limitations under the License. */ +#ifndef NO_BINDER #include <binder/IPCThreadState.h> #include <binderthreadstate/CallerUtils.h> +#endif // NO_BINDER #include <hwbinder/IPCThreadState.h> #include <private/gui/BufferQueueThreadState.h> #include <unistd.h> @@ -23,17 +25,25 @@ namespace android { uid_t BufferQueueThreadState::getCallingUid() { +#ifndef NO_BINDER if (getCurrentServingCall() == BinderCallType::HWBINDER) { return hardware::IPCThreadState::self()->getCallingUid(); } return IPCThreadState::self()->getCallingUid(); +#else // NO_BINDER + return hardware::IPCThreadState::self()->getCallingUid(); +#endif // NO_BINDER } pid_t BufferQueueThreadState::getCallingPid() { +#ifndef NO_BINDER if (getCurrentServingCall() == BinderCallType::HWBINDER) { return hardware::IPCThreadState::self()->getCallingPid(); } return IPCThreadState::self()->getCallingPid(); +#else // NO_BINDER + return hardware::IPCThreadState::self()->getCallingPid(); +#endif // NO_BINDER } } // namespace android |