diff options
| author | 2020-02-10 18:48:40 +0000 | |
|---|---|---|
| committer | 2020-02-10 18:48:40 +0000 | |
| commit | db6ba5e853c43863225aa38fdad2333d59508688 (patch) | |
| tree | 84ad184caac06bc41b85ae5632e2bb097eeab614 /libs/gui/BufferQueueThreadState.cpp | |
| parent | 8917ac6fb9f1cdde14d8d05e8a1fde11b9fdf5eb (diff) | |
| parent | 62493096843ffd4fd2a134588181599727f1c10d (diff) | |
Merge "Remove libbinder usage from media.swcodec apex"
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 |