diff options
author | 2022-04-30 01:38:24 +0000 | |
---|---|---|
committer | 2022-05-19 03:19:42 +0000 | |
commit | 47f8c4f07bc8ce8ce7fba66d93114e948cc01d8e (patch) | |
tree | 7c4fe43c74bacf6f934a3985464adba7410f3a05 /libs/binder/RpcSession.cpp | |
parent | 7cdf5c26a1c53eae846c87e10eb2d2f34a8a2f34 (diff) |
libbinder: disable JavaThreadAttacher on non-Android OSes
Bug: 224644083
Test: m
Change-Id: Ibfa0535fa09af569f55aa1e6b8d5ff6adb720eb3
Diffstat (limited to 'libs/binder/RpcSession.cpp')
-rw-r--r-- | libs/binder/RpcSession.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/RpcSession.cpp b/libs/binder/RpcSession.cpp index 6c48c88661..6ae5357be2 100644 --- a/libs/binder/RpcSession.cpp +++ b/libs/binder/RpcSession.cpp @@ -43,7 +43,7 @@ #include "RpcWireFormat.h" #include "Utils.h" -#ifndef __ANDROID_RECOVERY__ +#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__) #include <android_runtime/vm.h> #include <jni.h> #endif @@ -316,7 +316,7 @@ RpcSession::PreJoinSetupResult RpcSession::preJoinSetup( } namespace { -#ifdef __ANDROID_RECOVERY__ +#if !defined(__ANDROID__) || defined(__ANDROID_RECOVERY__) class JavaThreadAttacher {}; #else // RAII object for attaching / detaching current thread to JVM if Android Runtime exists. If |