From 11cfdccfd3cfceb08732909a1489419ff0229694 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Fri, 14 Feb 2014 20:14:02 -0800 Subject: [PATCH] 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 --- libs/binder/IPCThreadState.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index cb42549aab..7796309593 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) -- 2.11.0