I'm sending intents from native layer to Java layer at a very high rate ( more than 100 intents / sec ). If the CPU load is high, a TransactionTooLargeException is thrown in logcat, but i cannot catch it back in the native sender.
My intents have small payload of about 300 bytes, and indeed, i've checked that at the moment of the first exception, i have about 1 MB worth of intents sent but not received the other end ( in the Java app).
Here is my native sender code.
sp<IServiceManager> mServiceManager = defaultServiceManager();
sp<IBinder> mActivityManager = mServiceManager->checkService(String16("activity"));
status_t ret = mActivityManager->transact(BROADCAST_INTENT_TRANSACTION, mData, &mReply, 0);
if (ret == NO_ERROR)
{
int32_t exceptionCode = mReply.readExceptionCode();
if (!exceptionCode)
{
status = true;
}
else
{
ALOGD("exception %d\n", exceptionCode);
}
}
else
{
ALOGD("error: %d", ret);
}