summaryrefslogtreecommitdiffstats
path: root/libs/binder/IPCThreadState.cpp
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2014-02-14 20:14:02 -0800
committerArve Hjønnevåg <arve@android.com>2014-02-14 20:18:13 -0800
commit11cfdccfd3cfceb08732909a1489419ff0229694 (patch)
treebf8208c40841166128205edde6a9768992991723 /libs/binder/IPCThreadState.cpp
parent7d86b45472898373bbe3ef03286b66d71ea82b79 (diff)
downloadframeworks_native-11cfdccfd3cfceb08732909a1489419ff0229694.zip
frameworks_native-11cfdccfd3cfceb08732909a1489419ff0229694.tar.gz
frameworks_native-11cfdccfd3cfceb08732909a1489419ff0229694.tar.bz2
Binder: Disable attemptIncStrongHandle
The driver does not support BC_ATTEMPT_ACQUIRE and will return an error. IPCThreadState does not handle driver errors, and will resend the failed command blocking all other commands. Change-Id: I643986037341821b27b62dc82df933844f4842b8
Diffstat (limited to 'libs/binder/IPCThreadState.cpp')
-rw-r--r--libs/binder/IPCThreadState.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index cb42549..7796309 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -635,6 +635,7 @@ void IPCThreadState::decWeakHandle(int32_t handle)
status_t IPCThreadState::attemptIncStrongHandle(int32_t handle)
{
+#if HAS_BC_ATTEMPT_ACQUIRE
LOG_REMOTEREFS("IPCThreadState::attemptIncStrongHandle(%d)\n", handle);
mOut.writeInt32(BC_ATTEMPT_ACQUIRE);
mOut.writeInt32(0); // xxx was thread priority
@@ -649,6 +650,11 @@ status_t IPCThreadState::attemptIncStrongHandle(int32_t handle)
#endif
return result;
+#else
+ (void)handle;
+ ALOGE("%s(%d): Not supported\n", __func__, handle);
+ return INVALID_OPERATION;
+#endif
}
void IPCThreadState::expungeHandle(int32_t handle, IBinder* binder)