Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39f720c5 authored by Jacky Wang's avatar Jacky Wang
Browse files

[Catalyst] Fix no response for TransactionTooLargeException

Bug: 421032965
Flag: EXEMPT library
Test: manual
Change-Id: Ia5a6c46cc7c56d06338f2d2d19164342e96eaad5
parent 5a369599
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.os.IBinder
import android.os.Looper
import android.os.Message
import android.os.Messenger
import android.os.TransactionTooLargeException
import android.util.Log
import androidx.annotation.VisibleForTesting
import kotlinx.coroutines.CoroutineScope
@@ -139,7 +140,14 @@ open class MessengerService(
                Log.e(TAG, "Internal error when handle [txnId=$txnId,apiId=$apiId]", e)
            }
            try {
                try {
                    replyTo.send(response)
                } catch (e: TransactionTooLargeException) {
                    Log.w(TAG, "[txnId=$txnId,apiId=$apiId] $e")
                    response.data = null
                    response.arg2 = ApiServiceException.CODE_INTERNAL_ERROR
                    replyTo.send(response)
                }
            } catch (e: Exception) {
                Log.w(TAG, "Fail to send response for [txnId=$txnId,apiId=$apiId]", e)
                // nothing to do