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

Commit 148e86e5 authored by Roshan Pius's avatar Roshan Pius
Browse files

RemoteException: Mark rethrow* APIs public

Bug: 144435970
Test: Compiles
Change-Id: I361f5d27529c938fff42fdbabb63f7b87527a270
parent 1b14a1cc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -35360,6 +35360,8 @@ package android.os {
  public class RemoteException extends android.util.AndroidException {
    ctor public RemoteException();
    ctor public RemoteException(String);
    method @NonNull public RuntimeException rethrowAsRuntimeException();
    method @NonNull public RuntimeException rethrowFromSystemServer();
  }
  public class ResultReceiver implements android.os.Parcelable {
+11 −5
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package android.os;

import android.annotation.UnsupportedAppUsage;
import android.annotation.NonNull;
import android.util.AndroidException;

/**
@@ -37,7 +37,15 @@ public class RemoteException extends AndroidException {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    /** {@hide} */
    /**
     * Rethrow this as an unchecked runtime exception.
     * <p>
     * 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.
     */
    @NonNull
    public RuntimeException rethrowAsRuntimeException() {
        throw new RuntimeException(this);
    }
@@ -52,10 +60,8 @@ public class RemoteException extends AndroidException {
     * 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.
     *
     * @hide
     */
    @UnsupportedAppUsage
    @NonNull
    public RuntimeException rethrowFromSystemServer() {
        if (this instanceof DeadObjectException) {
            throw new RuntimeException(new DeadSystemException());