Google is committed to advancing racial equity for Black communities. See how.
Added in API level 1

RemoteException

open class RemoteException : AndroidException
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ android.util.AndroidException
   ↳ android.os.RemoteException

Parent exception for all Binder remote-invocation errors

Summary

Public constructors

<init>(message: String!)

Public methods

open RuntimeException

Rethrow this as an unchecked runtime exception.

open RuntimeException

Rethrow this exception when we know it came from the system server.

Public constructors

<init>

Added in API level 1
RemoteException()

<init>

Added in API level 15
RemoteException(message: String!)

Public methods

rethrowAsRuntimeException

Added in API level 30
open fun rethrowAsRuntimeException(): RuntimeException

Rethrow this as an unchecked runtime exception.

Apps making calls into other processes may end up persisting internal state or making security decisions based on the perceived success or failure of a call, or any default values returned. For this reason, we want to strongly throw when there was trouble with the transaction.

Return
RuntimeException This value cannot be null.
Exceptions
java.lang.RuntimeException

rethrowFromSystemServer

Added in API level 30
open fun rethrowFromSystemServer(): RuntimeException

Rethrow this exception when we know it came from the system server. This gives us an opportunity to throw a nice clean DeadSystemException signal to avoid spamming logs with misleading stack traces.

Apps making calls into the system server may end up persisting internal state or making security decisions based on the perceived success or failure of a call, or any default values returned. For this reason, we want to strongly throw when there was trouble with the transaction.

Return
RuntimeException This value cannot be null.
Exceptions
java.lang.RuntimeException